Advertisement
Guest User

Untitled

a guest
Apr 25th, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. select dest_id, thread#,
  2. max_primary_log,
  3. max(shipped_log) max_shipped_log,
  4. max(applied_log) max_applied_log
  5. from (
  6. SELECT dest_id, thread#, standby_dest,
  7. max (sequence#) over (partition by thread#) max_primary_log,
  8. DECODE( standby_dest, 'YES', sequence#, 0 ) shipped_log,
  9. DECODE( applied, 'YES', sequence#, 0 ) applied_log
  10. FROM v$archived_log
  11. where resetlogs_change# =
  12. (select max(resetlogs_change#)
  13. from v$archived_log)
  14. ) where standby_dest='YES'
  15. GROUP BY thread#,dest_id, max_primary_log ;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement