Sometimes the production library may be wrong operation, then we use goldengate synchronized data will also be wrong, if the target library does not require real-time, then we can use delay parameters to make the target library delay application. So we can protect the data before the wrong operation.
applies To:Oracle goldengate-version 10.4.0.0 and later Information in this document applies to any platform. GOALHow to add a DELAY in the application of transactions when using Oracle GoldenGate?
SolutionThe following is the options available for delaying the application of transactions on the target. Option 1: (Recommended)
You could use the Deferapplyinterval parameter to set a amount of time that Replicat waits before applying captured TR Ansactions to the target database.
Default 0 (no delay)
Syntax [Deferapplyinterval <n><unit>]
<n> is a numeric value for the amount of time Delay. Minimum is set by the Eofdelay parameter. Maximum is seven days. <unit> can be: S | SEC | SECS | SECOND | SECONDS | MIN | MINS | MINUTE | MINUTES | HOUR | HOURS | Day | Days
This example directs Replicat to wait 2 hours before posting its transactions.
Deferapplyinterval 2HOURS
Option 2:
You can also look at the Eofdelay in the Replicat. When the Replicat positions to trail EOF and then you could has the replicat wait for the seconds or minutes before doing More work.
This example directs Replicat to wait for the replicate positions to the trail EOF.
Eofdelay 600
The eofdelay suspends the Replicat checking the trail. While Deferapplyinterval causes the Replicat to suspend applying the data read from the trail. So former introduces the delay of reading while latter introduces the delay while applying.
|
For Example:
Ggsci (ZBDBA2) 1> view param rep1replicat rep1assumetargetdefsuserid ogg, PASSWORD oggdiscardfile./dirdat/rep1_ Discard.txt,append,megabytes 5DDL INCLUDE mappedddloptions reportdboptions deferrefconstdboptions LOBWRITESIZE 102400DEFERAPPLYINTERVAL 2MINHANDLECOLLISIONSDDLERROR DEFAULT DISCARD retryop maxretries 5 RetryDelay 20-- Grouptransops 1--maxtransops 1APPLYNOOPUPDATESMAP zbdba.*,target zbdba.*;
How to add a DELAY in applying transactions in GoldenGate?