My Oracle Support Banner

SQLEXEC For Before Image Not Executing. (Doc ID 2278328.1)

Last updated on MARCH 25, 2019

Applies to:

Oracle GoldenGate - Version 12.1.2.0.0 and later
Information in this document applies to any platform.
Replicat is configured with the following SQLEXEC:

MAP TEST.XXX_RECORDS, TARGET XXX.XXX_XXX_RECORDS,
SQLEXEC (SPNAME XXX.TEST, ID INS_XXX_XXX_RECORDS,
PARAMS(
P_SRC_SYS = @token ('XXX_DBNAME'),
P_SRC_SCN = @token ('XXX_XXX_SCN'),
P_SRC_COMMIT_TMS = @token ('XXX_XXX_C_TXX'),
P_TABLE_NME = 'XXX_RECORDS'
),
ERROR FATAL
),
SQLEXEC (ID NEXT_XXX_XXX_RECORDS,
QUERY 'SELECT XXX.XXXX_XXXX_SEQ.NEXTVAL AS P_SEQ from dual',
NOPARAMS,
ERROR FATAL
),
COLMAP (
GENERATED_ID = NEXT_XXX_XXX_RECORDS.P_SEQ,
AS_OF = @DATE ('YYYY-MM-DD', 'YYYY-MM-DD:HH:MI:SS.FFFFFF', CREATED),
AS_AT = INS_XXX_XXX_RECORDS.P_AS_AT,
SOURCE = @token ('XXX_DBNAME'),
INTERNAL_AS_AT = INS_XX_XXX_RECORDS.P_AS_AT,
ROW_TYPE = @CASE (@token ('XXX_SRC_OPR') , 'SQL COMPUPDATE', 0, 'INSERT', 0, 'DELETE', 16777216, 0 ),


The issue is, that the SQLEXEC would execute only on the AFTER image in the trail and not on BEFORE Image (The trail record had separate BEFORE and AFTER images).

Goal

 How to replicate when using SQLEXEC for separate BEFORE and AFTER images on trail.

Solution

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Goal
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.