Skip to Main Content

GoldenGate

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Golden gate sqlexec

User_KCASXAug 22 2019 — edited Aug 24 2019

Hi,

We are using sqlexec to get target db info to populate the audit columns. Code as below.

MAP Source.table , TARGET target.table, &

sqlexec (ID lookup, QUERY 'select systimestamp from dual'), &

sqlexec (ID target, QUERY 'select current_scn from v$database'), &

colmap(usedefaults, OP_TYPE = @GETENV ('GGHEADER', 'OPTYPE'), SR_COMMIT_TS = @GETENV ('GGHEADER', 'COMMITTIMESTAMP'), TRG_COMMIT_TS = @getval (lookup.systimestamp), TRG_COMMIT_USR = 'GGADMIN' , SCN_NUMBER = @getval (target.current_scn));

We have hundreds of tables in the replication mapping. Is there a simpler way to reuse the sqlexec code to define once and call multiple time across the mappings?

Comments
Post Details
Added on Aug 22 2019
6 comments
306 views