In this post we will discuss about different types of lag displayed when we do info all on GGSCI prompt.
When we do “info all” in GGSCI prompt, 2 types of lag are shown:
Lag at checkpoint
Time since checkpoint.
GGSCI (ggate1) 1> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT ABENDED DPINT29 00:00:00 38:35:56
EXTRACT RUNNING EXTINT29 00:00:00 00:00:03
To understand the difference between two first we need to understand Oracle Goldengate Checkpoint feature.
In Oracle Goldengate each process has its own checkpoint file. Extract extint29 in above “info all” output has its own checkpoint file. Similarly DPINT29 has its own checkpoint file. The checkpoint files resides inside $OGG_HOME/dirchk directory. below is output from dirchk from my env:
cd /u01/app/oracle/product/gg_src/dirchk
[oracle@ggate1 dirchk]$ ls -lart
drwxr-xr-x 29 oracle oinstall 4096 May 5 21:51 ..
-rw-r—– 1 oracle oinstall 4096 May 18 13:26 EXTINT29.cpb
-rw-r—– 1 oracle oinstall 67584 May 16 22:45 DPINT29.cpe
-rw-r—– 1 oracle oinstall 124928 May 18 13:47 EXTINT29.cpe
Checkpoint allows Oracle Goldengate to restart its process ensuring zero data loss and data integrity. Consider the GG process was stopped on Friday 10 PM and due to weekend no one looked into it and they continued to be in Stopped/Abended mode whole weekend. On Mon Morning they were restarted upon fixing the issue at 9 AM. The question is : From what point it will start processing transactions upon restart? From 10 PM FRI when it was actually stopped or 9 AM Mon when u restarted? What do you think? If it restarts from 9 AM Mon then there will be data loss and if it restarts from 10 PM Friday, where it will get that information from?
As we mentioned Goldengate ensures zero data loss. For that to happen process should start from 10 PM Friday. Let us see how:
This happens using Oracle Goldengate checkpoint. Each process in Goldengate has its own checkpoint file which gets updated by default every 10 sec. So when extract process will restart on Mon 9 AM, it will refer to checkpoint file present in dirchk directory and based on information present it will continue to process transactions upon restart. So when the process was Stopped/Abended, checkpoint file was last updated on Fri 10 PM and hence process will restart itself referring to checkpoint file. Checkpointing in Oracle Goldengate will ensure data integrity.
Now since we have understood about checkpoint, now we can discuss about different LAGs:
Time since checkpoint is the time elapsed since the checkpoint file associated to process was updated.
By default the checkpoint file of each process gets updated every 10 seconds if the process is in running status. So this value, in normal circumstances will not cross 10 secs. So when a process is stopped or abended, u will notice that timing continously increases as the checkpoint files are not updated orwritten into. In the example shown we notice that DPINT29 is abended for last 38 hours and checkpoint file hasn’t been updated as well. So when the process will start it will start from May 16 ensuring no data loss preserving data integrity.
Lag at checkpoint is the lag encountered when the checkpoint file was updated. So, checkpoint file gets updated every 10 seconds. When the checkpoint file was updated last, lag encountered for the process at that moment is Lag at checkpoint.
Thanks for reading the blog!
I hope the blog gave u good insight on difference between LAG AT CHKPT and TIME SINCE CHKPT. Do share your feedback in comment section and also for latest videos don’t forget to like and subscribe my Youtube Channel:
https://youtube.com/ashishagarwal_gg
Also feel free to like and share this blog. For any query feel free to revert @ ashishagarwalag@gmail.com or whatsapp@ +14168715708. For live Instructor led Training and consulting requirement for Oracle Goldengate, Pls do fill out contact information form using below link: https://lnkd.in/gC7pfn2
Regards,
Ashish Agarwal
Oracle DBA and Oracle Goldengate expert