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

Last updated on JULY 15, 2017

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 FTB_TRUST.FFF_RECORDS, TARGET ORI.FTB_FFF_RECORDS,
SQLEXEC (SPNAME ORI.ESP_OGG_INS_TRAN_TRACK, ID INS_FTB_FFF_RECORDS,
PARAMS(
P_SRC_SYS = @token ('TKN_DBNAME'),
P_SRC_SCN = @token ('TKN_SRC_SCN'),
P_SRC_COMMIT_TMS = @token ('TKN_SRC_C_TMS'),
P_TABLE_NME = 'FFF_RECORDS'
),
ERROR FATAL
),
SQLEXEC (ID NEXT_FTB_FFF_RECORDS,
QUERY 'SELECT ORI.ESP_GENERATED_ID_SEQ.NEXTVAL AS P_SEQ from dual',
NOPARAMS,
ERROR FATAL
),
COLMAP (
GENERATED_ID = NEXT_FTB_FFF_RECORDS.P_SEQ,
AS_OF = @DATE ('YYYY-MM-DD', 'YYYY-MM-DD:HH:MI:SS.FFFFFF', CREATED),
AS_AT = INS_FTB_FFF_RECORDS.P_AS_AT,
SOURCE = @token ('TKN_DBNAME'),
INTERNAL_AS_AT = INS_FTB_FFF_RECORDS.P_AS_AT,
ROW_TYPE = @CASE (@token ('TKN_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

Sign In with your My Oracle Support account

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

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms