Discussions
Categories
- 17.9K All Categories
- 3.4K Industry Applications
- 3.3K Intelligent Advisor
- 63 Insurance
- 535.7K On-Premises Infrastructure
- 138.1K Analytics Software
- 38.6K Application Development Software
- 5.6K Cloud Platform
- 109.3K Database Software
- 17.5K Enterprise Manager
- 8.8K Hardware
- 71K Infrastructure Software
- 105.2K Integration
- 41.5K Security Software
Running SQL Procedure just before COMMIT

Hello,
I'm migrating from DB2 SQL Replication (DB2 source, DB2 target) to GoldenGate. The DB2 replication has a call to SQL Procedure in the statements for a specific Replication Set and I need to do the same in the GoldenGate.
Is there any way to achieve this behaviour?
Thank you
Answers
-
Hi ,
Use the SQLEXEC feature to execute database statements or call procs from GG processes. Please check the below,
Regards,
Veera
-
Unfortunately SQLEXEC in the MAP statement executes even before the MAP is "executed" (insert / update / delete) as the result can be used in the MAP statement itself.
Standalone SQLEXEC has a timer, which means it either runs when not needed or there's no guarantee it will be run right before the COMMIT, e.g. the timing may cause to run the SQL procedure some time after COMMIT, which may cause inconsistent behaviour.
-
As your requirement is ti run the SP on a subset of data, you must use sqlexec with MAP statement. Sqlexec for MAP statements have the option to run the SP on the data set before or after the mapping
Check options AFTERFILTER/BEFOREFILTER in sqlexec documentation
Also , you can choose the iteration of SP run , again option EXEC {MAP | ONCE | TRANSACTION | SOURCEROW}