Creating a GoldenGate configuration to run a Shell script when an end-of-day processing record is replicated
GoldenGate offers a feature called EVENTMARKER
using which you can build some events into the process group configuration based on which certain actions will be performed. In this recipe, we will demonstrate how we can run a job in the target environment based on what is replicated to the target tables. This is quite useful in cases where you would run a replication load and would want to perform an activity which is dependent on the successful completion of the data load.
Getting ready
For this recipe, we will create the following table in both the source and target databases:
SOURCE DATABASE |
TARGET DATABASE |
---|---|
PROCESS_STATUS |
PROCESS_STATUS |
TIMESTAMP |
TIMESTAMP |
STATE |
STATE |
We will also assume that we have a script called Update_Balances.sh
in the target environment which runs a batch process to update balances once the load for the day has completed.
How to do it...
Let's look at...