Quick script to start troubleshooting Data Guard gap/lag

Scenario: you are connected to the primary database and want to know if one or more of your standby databases are lagging behind? The script below will show the log sequences involved and even how many hours wide is the gap, for each thread of each standby database:

*Remember to Like/Share if you copy the script. Thanks!

DataGuard Gap Script

This is a sample output for it, it shows three two-node standby databases:

   DEST_ID    THREAD#    PRIMARY  MAXTRANSF    STANDBY MINTRANSF_GAP  APPLY_GAP   HOURSGAP
---------- ---------- ---------- ---------- ---------- ------------- ---------- ----------
         2          1      45798      45798      45798             0          0          0
         3          1      45798      45798      45798             0          0          0
         4          1      45798      45798      45798             0          0          0
         2          2      45606      45606      45605             0          1          0
         3          2      45606      45606      45605             0          1          0
         4          2      45606      45606      45605             0          1          0
Advertisements
This entry was posted in Availability, Oracle and tagged . Bookmark the permalink.

2 Responses to Quick script to start troubleshooting Data Guard gap/lag

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s