Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select dest_id, thread#,
- max_primary_log,
- max(shipped_log) max_shipped_log,
- max(applied_log) max_applied_log
- from (
- SELECT dest_id, thread#, standby_dest,
- max (sequence#) over (partition by thread#) max_primary_log,
- DECODE( standby_dest, 'YES', sequence#, 0 ) shipped_log,
- DECODE( applied, 'YES', sequence#, 0 ) applied_log
- FROM v$archived_log
- where resetlogs_change# =
- (select max(resetlogs_change#)
- from v$archived_log)
- ) where standby_dest='YES'
- GROUP BY thread#,dest_id, max_primary_log ;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement