CUSEREXIT
Valid For
Replicat
Description
Use the CUSEREXIT parameter to call a custom exit routine written in C programming code from a Windows DLL or UNIX shared object at a defined exit point within Oracle GoldenGate processing. Your user exit routine must be able to accept different events and information from the Replicat processes, process the information as desired, and then return a response and information to the caller (the Oracle GoldenGate process that called it).
User exits can be used as an alternative to, or in conjunction with, the data transformation functions that are available within the Oracle GoldenGate solution.
Note: When using a coordinated Replicat to call a user exit routine, you are responsible for writing the user exits in a thread-safe manner.
For help with creating and implementing user exits, see Using User Exits to Extend Oracle GoldenGate Capabilities.
Default
None
Syntax
CUSEREXIT {DLL | shared_object} routine
[, INCLUDEUPDATEBEFORES]
[, PARAMS 'string']
| *{DLL* | shared_object}** |
The name of the Windows DLL or UNIX shared object that contains the user exit function.
routine
The name of the exit routine to be executed.
INCLUDEUPDATEBEFORES
Passes the before images of column values to a user exit. When using this parameter, you must explicitly request the before image by setting the requesting_before_after_ind flag to BEFORE_IMAGE_VAL within a callback function that supports this flag. Otherwise, only the after image is passed to the user exit. By default, Oracle GoldenGate only works with after images.
When using INCLUDEUPDATEBEFORES for a user exit that is called from Replicat, always use the GETUPDATEBEFORES parameter for the tranlog Extract process, so that the before image is written to the trail.
PARAMS ‘string’
Passes the specified string at startup. Can be used to pass a properties file, startup parameters, or other string. Enclose the string within single quote marks.
Data in the string is passed to the user exit in the EXIT_CALL_START exit_params_def.function_param. If no quoted string is specified with PARAMS, the exit_params_def.function_param is NULL.
Examples
Example 1
CUSEREXIT userexit.dll MyUserExit
Example 2
CUSEREXIT userexit.dll MyUserExit, PARAMS 'init.properties'
Example 3
CUSEREXIT userexit.dll MyUserExit, INCLUDEUPDATEBEFORES, PARAMS 'init.properties'
Example 4
CUSEREXIT userexit.dll MyUserExit, INCLUDEUPDATEBEFORES, &
PARAMS 'init.properties'
Example 5
CUSEREXIT cuserexit.dll MyUserExit, &
INCLUDEUPDATEBEFORES, PARAMS 'Some text to start with during startup'