Ever wanted to know if the standby database is up to date, or if all available archive logs have been transferred?
This article explains the details and step by step explanation for each line the log gap report which is run
Dbvisit Standby provides you with a report you can run that will quickly provide you with an overview of your environment.
This report can be generated from the command line using the command:
dbvisit -i <DDC> (Version 6.0 and 7.0)
dbvctl -d <DDC> -i (Version 8.0)
For example:
./dbvisit -i prod
Below is an explanation of the log gap report command using the CLI:
oracle@dbvlin601[/usr/local/dbvisit/standby]: ./dbvisit -i prod
=============================================================
Dbvisit Standby Database Technology (6.0.44.10534) (pid 27017)
dbvisit started on dbvlin601: Wed Feb 27 20:05:59 2013 ()
=============================================================
Dbvisit Standby log gap report for prod at 201302272005:
1. -> Standby database on dbvlin602 is at sequence: 812.
2. -> Primary database on dbvlin601 is at log sequence: 824.
3. -> Primary database on dbvlin601 is at archived log sequence: 823.
4. -> Dbvisit Standby last transfer log sequence: 820.
5. -> Dbvisit Standby last transfer at: 201302272003.
6. -> Archive log gap for prod: 11.
7. -> Transfer log gap for prod: 3.
8. -> Standby database time lag (HH:MI:SS): 00:03:57.
No Mail sent as SEND_MAIL_FLAG = N
=============================================================
dbvisit ended on dbvlin601: Wed Feb 27 20:06:03 2013
=============================================================
Note: The above output was modified to add the line numbers 1 to 8 to assist in explanation below.
Line 1 – Standby database on dbvlin602 is at sequence: 812.
Shows the last log sequence (812) that was applied to the standby database.
Line 2 – Primary database on dbvlin601 is at log sequence: 824
Shows the current log sequence on the primary (824).
Line 3 – Primary database on dbvlin601 is at archived log sequence: 823.
Shows the latest archive log sequence (823) available on the primary database.
Line 4 – Dbvisit Standby last transfer log sequence: 820.
Shows the last archive log sequence (820) that was transferred to the standby server.
Line 5 – Dbvisit Standby last transfer at: 201302272003.
The timestamp (YYYYMMDDHH24MI) of the last transfer.
Line 6 – Archive log gap for prod: 11.
This is one the most important lines to look at. It shows the Archive Log Gap, which means how many archive logs still need to be applied to the standby database. In this example the value is 11. This indicates that my standby database is 11 logs behind the primary. If this value is 0 it means all available Archive logs from the primary have been applied to the standby, and it is up to date. Before doing a Graceful Switchover operation it is important to make sure this value is 0, with the exception when RAC is used, then one of the instances may have a value of 1. To reduce this value, run Dbvisit Standby on the standby database.
Line 7 – Transfer log gap for prod: 3.
The second most important line to look at is the value for the Transfer Log Gap, and in this example the value is 3. This value indicates the number of logs that still need to be transferred to the standby server. To resolve this gap you need to run Dbvisit Standby on the primary server again to ship the latest available logs.
Line 8 - Standby database time lag (HH:MI:SS): 00:03:57.
The time displayed here provides you with an indication of how far behind in “Time” the standby database is from the primary. This value is calculated by looking at the current SCN number on the standby database, compared to the SCN number on the primary database. These numbers are converted to timestamps and the difference is then displayed.
Anton Els July 02, 2013 14:59
Comments