8.7 Function Codes

Function codes determine the output of the callback routine. The callback routine expects the contents of the data buffer to match the structure of the specified function code. The callback routine function codes and their data buffers are described in the following sections. The following is a summary of available functions.

Table 8-5 Summary of Oracle GoldenGate Function Codes

Function code Description

COMPRESS_RECORD

Use the COMPRESS_RECORD function when some, but not all, of a target table's columns are present after mapping and the entire record must be manipulated, rather than individual column values.

DECOMPRESS_RECORD

Use the DECOMPRESS_RECORD function when some, but not all, of a target table's columns are present after mapping and the entire record must be manipulated, rather than individual column values.

GET_BASE_OBJECT_NAME

Use the GET_BASE_OBJECT_NAME function to retrieve the fully qualified name of the base object of an object in a record.

GET_BASE_OBJECT_NAME_ONLY

Use the GET_BASE_OBJECT_NAME_ONLY function to retrieve only the name of the base object of an object in a record.

GET_BASE_SCHEMA_NAME_ONLY

Use the GET_BASE_SCHEMA_NAME_ONLY function to retrieve only the name of the schema of the base object of an object in a record.

GET_BEFORE_AFTER_IND

Use the GET_BEFORE_AFTER_IND function to determine whether a record is a before image or an after image of the database operation.

GET_CATALOG_NAME_ONLY

Use the GET_CATALOG_NAME_ONLY function to return the name of the database catalog.

GET_COL_METADATA_FROM_INDEX

Use the GET_COL_METADATA_FROM_INDEX function to determine the column metadata that is associated with a specified column index.

GET_COL_METADATA_FROM_NAME

Use the GET_COL_METADATA_FROM_NAME function to determine the column metadata that is associated with a specified column name.

GET_COLUMN_INDEX_FROM_NAME

Use the GET_COLUMN_INDEX_FROM_NAME function to determine the column index associated with a specified column name.

GET_COLUMN_NAME_FROM_INDEX

Use the GET_COLUMN_NAME_FROM_INDEX function to determine the column name associated with a specified column index.

GET_COLUMN_VALUE_FROM_INDEX

Use the GET_COLUMN_VALUE_FROM_INDEX function to return the column value from the data record using the specified column index.

GET_COLUMN_VALUE_FROM_NAME

Use the GET_COLUMN_VALUE_FROM_NAME function to return the column value from the data record by using the specified column name.

GET_DATABASE_METADATA

Use the GET_DATABASE_METADATA function to return database metadata.

GET_DDL_RECORD_PROPERTIES

Use the GET_DDL_RECORD_PROPERTIES function to return information about a DDL operation.

GET_ENV_VALUE

Use the GET_ENV_VALUE function to return information about the Oracle GoldenGate environment.

GET_ERROR_INFO

Use the GET_ERROR_INFO function to return error information associated with a discard record.

GET_GMT_TIMESTAMP

Use the GET_GMT_TIMESTAMP function to return the operation commit timestamp in GMT format.

GET_MARKER_INFO

Use the GET_MARKER_INFO function to return marker information when posting data. Use markers to trigger custom processing within a user exit.

GET_OBJECT_NAME

Returns the fully qualified two- or three-part name of a table or other object that is associated with the record that is being processed.

GET_OBJECT_NAME_ONLY

Returns the unqualified name of a table or other object that is associated with the record that is being processed.

GET_OPERATION_TYPE

Use the GET_OPERATION_TYPE function to determine the operation type associated with a record.

GET_POSITION

Use the GET_POSITION function is obtain a read position of an Extract data pump or Replicat in the Oracle GoldenGate trail.

GET_RECORD_BUFFER

Use the GET_RECORD_BUFFER function to obtain information for custom column conversions.

GET_RECORD_LENGTH

Use the GET_RECORD_LENGTH function to return the length of the data record.

GET_RECORD_TYPE

Use the GET_RECORD_TYPE function to return the type of record being processed

GET_SCHEMA_NAME_ONLY

Use the GET_SCHEMA_NAME_ONLY function to return only the schema name of a table.

GET_SESSION_CHARSET

Use the GET_SESSION_CHARSET function to return the character set of the user exit session.

GET_STATISTICS

Use the GET_STATISTICS function to return the current processing statistics for the Extract or Replicat process.

GET_TABLE_COLUMN_COUNT

Use the GET_TABLE_COLUMN_COUNT function to return the total number of columns in a table.

GET_TABLE_METADATA

Use the GET_TABLE_METADATA function to return metadata for the table that associated with the record that is being processed.

GET_TABLE_NAME

Use the GET_TABLE_NAME function to return the fully qualified two- or three-part name of the source or target table that is associated with the record that is being processed.

GET_TABLE_NAME_ONLY

Use the GET_TABLE_NAME_ONLY function to return only the unqualified name of the table that is associated with the record that is being processed.

GET_TIMESTAMP

Use the GET_TIMESTAMP function to return the I/O timestamp associated with a source data record.

GET_TRANSACTION_IND

Use the GET_TRANSACTION_IND function to determine whether a data record is the first, last or middle operation in a transaction,

GET_USER_TOKEN_VALUE

Use the GET_USER_TOKEN_VALUE function to obtain the value of a user token from a trail record.

OUTPUT_MESSAGE_TO_REPORT

Use the OUTPUT_MESSAGE_TO_REPORT function to output a message to the report file.

RESET_USEREXIT_STATS

Use the RESET_USEREXIT_STATS function to reset the statistics for the Oracle GoldenGate process.

SET_COLUMN_VALUE_BY_INDEX

Use the SET_COLUMN_VALUE_BY_INDEX function to modify a single column value without manipulating the entire data record.

STRNCMP

Use the SET_COLUMN_VALUE_BY_NAME function to modify a single column value without manipulating the entire data record.

SET_OPERATION_TYPE

Use the SET_OPERATION_TYPE function to change the operation type associated with a data record.

SET_RECORD_BUFFER

Use the SET_RECORD_BUFFER function for compatibility with HP NonStop user exits, and for complex data record manipulation.

SET_SESSION_CHARSET

Use the SET_SESSION_CHARSET function to set the character set of the user exit session.

SET_TABLE_NAME

Use the SET_TABLE_NAME function to change the table name associated with a data record.