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?