Configuring different SQLEXEC options in replicat depending on source operation
edited Oct 22, 2012 7:20AM in GoldenGate, Streams and Distributed Database (MOSC) 4 commentsAnswered ✓
I'm extracting INSERT/UPDATE/DELETE operations for a table, and on the target database, I want to run a different stored procedure depending on whether the original transaction was an INSERT or DELETE (and not run any stored procedures upon UPDATE). Is there a way to do this? Any hints/guidance would be appreciated.
SQLEXEC (ID proc1, SPNAME insert_procedure_name,
AFTERFILTER,ERROR RAISE, TRACE ALL)
;
MAP my_table,TARGET my_table,
I've been trying to use the FILTER argument, but don't actually have a filter expression to apply, so the below doesn't work:
MAP my_table,TARGET my_table,
FILTER(ON INSERT),SQLEXEC (ID proc1, SPNAME insert_procedure_name,
AFTERFILTER,ERROR RAISE, TRACE ALL)
;
MAP my_table,TARGET my_table,
0