REPLICAT process is sometimes ABENDED due to file size limit.
GGSCI (standby) 1> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
REPLICAT ABENDED R_ERPAP 00:00:03 00:57:18
And we saw OGG-01172 this in the report file .
2024-12-22 10:01:31 ERROR OGG-01172 Discard file (/ogghome/dirrpt/R_ERPAP.dsc) exceeded max bytes (-294967296).
To solve it, we usually rename the discard file to make it step aside, then restart the process. However, the interruption of REPLICAT process is very annoying to administrators, we need some way to deal with it.
PURGE
Using PURGE instead of APPEND in DISCARDFILE is one way to workaround the interruption.
[oracle@standby ~]$ cd $OGG_HOME/dirprm
[oracle@standby dirprm]$ diff r_erpap-original.prm r_erpap-candidate.prm
18c18
< discardfile /ogghome/dirrpt/R_ERPAP.dsc, append, megabytes 4000
---
> discardfile /ogghome/dirrpt/R_ERPAP.dsc, purge, megabytes 4000
But PURGE won't keep historical discard records.
DISCARDROLLOVER
Another way is to use DISCARDROLLOVER to rotate the discard file every Sunday. Here we prepare a candidate parameter file for REPLICAT process, then compare their differences.
[oracle@standby dirprm]$ diff r_erpap-original.prm r_erpap-candidate.prm
18a19
> DISCARDROLLOVER ON SUNDAY
After validating the candidate parameter file, we can engage the parameter file by copying it to the formal one.
[oracle@standby dirprm]$ cp r_erpap-candidate.prm r_erpap.prm
Then remove the discard file and restart REPLICAT process
GGSCI (standby) 3> start R_ERPAP
Sending START request to MANAGER ...
REPLICAT R_ERPAP starting
GGSCI (standby) 4> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
REPLICAT RUNNING R_NDCIS 00:52:04 00:00:00
We will check the rotation result after Sunday to make sure everything is going well.