High Availability Data Guard, Sharding and Global Data Services (MOSC)

MOSC Banner

Show standby lag time

 HI

We are currently using Oracle 9.2.0.7 on RedHat Linux 4. We have one priamry and 3 physical standby databases in our configuration

Does anyone have a query or script to monitor (from the primary server) how far behind is a partiular standby database. the best query that I can come up with is (this shows the lag in minutes for the standby database with dest_id 4)

with a as ( select max( completion_time) ct from v$archived_log
  where dest_id = 4 and applied='YES'
),
b as ( select max(completion_time) ctt from v$archived_log
    where dest_id = 1
)
select round((b.ctt - a.ct) * 24 * 60) from a,b

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center