-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdg_sequence.sql
More file actions
26 lines (23 loc) · 805 Bytes
/
dg_sequence.sql
File metadata and controls
26 lines (23 loc) · 805 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
----------------------------------------------------------------------------------------
--
-- File name: dg_sequence.sql
--
-- Purpose: Compares difference in ORL with SRL
--
-- Author: jpsaraiva
--
-- Version: 2017/05/16
--
-- Example: @dg_gap.sql
--
-- Notes: Developed and tested on 11.2.0.4.
-- Only works if there is connectivity between primary and standby
--
---------------------------------------------------------------------------------------
--
set pagesize 100 lines 120 pages 1000 heading on feed off null '' ver off
select l.thread# thread#,l.seq primary_seq,s.seq standby_seq from
(select thread#,max(sequence#) seq from v$log group by thread#) l,
(select thread#,max(sequence#) seq from v$standby_log where status='ACTIVE' group by thread#) s
where l.thread#=s.thread#
order by 1;