Map definition file

The Gateway for Oracle writes to the three tables in the Oracle database: Status, Journal, and Details.

To do this, the gateway maps data to the appropriate fields in the Oracle database. The map definition file contains mappings that define how the gateway maps this data. The names for these mappings are determined by the OracleStatusMap, OracleJournalMap, and OracleDetailsMap properties in the properties file.

The default map definition file is:

  • $OMNIHOME/gates/nco_g_oracle/nco_g_oracle.map for UNIX operating systems
  • %OMNIHOME%\gates\nco_g_oracle\nco_g_oracle.map for Windows operating systems
Attention: The gateway uses the cached values of the ServerName and ServerSerial attributes in the ObjectServer for updates and deletes instead of getting the mapped values from the Oracle database. Do not update the ServerName and ServerSerial values in the default nco_g_oracle.map file supplied with the gateway.

Syntax

Mappings for use with the Gateway for Oracle must use the following syntax:

CREATE MAPPING mappingname 
(
‘OracleFieldName' = [ '@fieldname' | gateway_named_attribute |
 simple_expression ] [ CONVERT TO type ]
[ , OracleFieldName = [ '@fieldname' | gateway_named_attribute |
 simple_expression ] [ON INSERT ONLY] [ CONVERT TO type ]] 
[NOTNULL, '@defaultfield']...
) ;

Where:

  • mappingname is the name of the mapping to be created.
  • OracleFieldName is the field name for the field to be written to in the Oracle database.
  • fieldname is the name of a field in the ObjectServer alerts.status table.
  • defaultfield is the name of a field in the ObjectServer alerts.status table you want to use as a default value for a different field.
  • gateway_named_attribute is one of the following attributes:
    • ACTION_CODE
    • ACTION_TIME
    • SERIAL
    • SERVER_SERIAL
    • SERVER_NAME
    • IDENTIFIER
    • DELETEDAT
  • simple_expression expressed in Backus-Naur Form (BNF) notation is as follows:
    <map_expr>  ::= <map_value> | <map_expr> <operator> <map_value> 
    <map_value> ::= @fieldname | static_value | gateway_named_attribute
    <operator>  ::= + | - | / | *
    Note: The only valid operator for strings is + (concatenation).

The following topics show examples mappings for running the gateway in reporter or audit mode: