Using Macros to Check Name Metadata

The object name that is passed by the user exit API is the exact name that is encoded in the user-exit session character set, and exactly the same name that is retrieved from the database. If the user exit compares the object name with a literal string, the user exit must retrieve the database locale and then normalize the string so that it is compared with the object name in the same encoding.

Oracle GoldenGate provides the following macros that can be called by the user exit to check the metadata of database object names. For example, a macro can be used to check whether a quoted table name is case-sensitive and whether it is stored as mixed-case in the database server. These macros are defined in the usrdecs.h file.

Table 11-20 Macros for metadata checking

Macro What it verifies

supportsMixedCaseIdentifiers( nameMeta, DbObjType )

Whether the database treats a mixed-case unquoted name of a specified data type as case-sensitive and stores the name in mixed case.

supportsMixedCaseQuotedIdentifiers( nameMeta, DBObjType )

Whether the database treats the mixed-case quoted name of a specified data type as case-sensitive and stores the name in mixed case.

storesLowerCaseIdentifiers( nameMeta, DbObjType )

Whether the database treats the mixed-case unquoted name of a specified data type as case-insensitive and stores the name in lower case.

storesLowerCaseQuotedIdentifiers( nameMeta, DbObjType )

Whether the database treats the mixed-case quoted name of a specified data type as case-insensitive and stores the name in lower case.

storesMixedCaseIdentifiers( nameMeta, DbObjType )

Whether the database treats the mixed-case unquoted name of a specified data type as case-insensitive and stores the name in mixed case.

storesMixedCaseQuotedIdentifiers( nameMeta, DbObjType )

Whether the database treats the mixed-case quoted name of a specified data type as case-insensitive and stores the name in mixed case.

storesUpperCaseIdentifiers( nameMeta, DbObjType )

Whether the database treats the mixed-case unquoted name of a specified data type as case-insensitive and stores the name in upper case.

storesUpperCaseQuotedIdentifiers( nameMeta, DbObjType )

Whether the database treats the mixed-case quoted name of a specified data type as case-insensitive and stores the name in upper case.