Valid For
Extract and Replicat
Description
Use the GET_CATALOG_NAME_ONLY
function to retrieve the name of theOracle CDB container, but not the name of the owner (such as schema) or object, of the source or target object associated with the record being processed. This function is valid for DML and DDL operations.
To return the fully qualified name of a table, see the following:
To return the fully qualified name of a non-table object, such as a user, view or index, see the following:
To return only the unqualified table or object name, see the following:
To return other parts of the table or object name, see the following:
Database object names are returned exactly as they are defined in the hosting database, including the letter case.
Syntax
#include "usrdecs.h" short result_code; env_value_def env_value; ERCALLBACK (GET_CATALOG_NAME_ONLY, &env_value, &result_code);
Buffer
typedef struct { char *buffer; long max_length; long actual_length; short value_truncated; short index; short source_or_target; } env_value_def;
Input
buffer
A pointer to a buffer to accept the returned catalog name. The name is null-terminated.
If the character session of the user exit is set with SET_SESSION_CHARSET
to a value other than the default character set of the operating system, as defined in ULIB_CS_DEFAULT
in the ucharset.h
file, the catalog name is interpreted in the session character set.
max_length
The maximum length of your allocated buffer to accept the name. This is returned as a NULL
terminated string.
source_or_target
One of the following indicating whether to return the source or target table catalog.
EXIT_FN_SOURCE_VAL EXIT_FN_TARGET_VAL
Output
buffer
The fully qualified, null-terminated catalog name.
actual_length
The string length of the returned name. The actual length does not include the null terminator.
value_truncated
A flag (0
or 1
) indicating whether or not the value was truncated. Truncation occurs if the length of the catalog name plus the null terminator exceeds the maximum buffer length.
Return Values
EXIT_FN_RET_INVALID_COLUMN EXIT_FN_RET_INVALID_CONTEXT EXIT_FN_RET_INVALID_PARAM EXIT_FN_RET_OK