This document provides steps to check database synchronization between a primary and standby database. It involves running queries on both the primary and standby to compare archived log sequence numbers and check the standby's applied status. If differences are found, it provides instructions to cancel recovery on the standby, alter the standby mount mode, and re-enable archiving on the primary to resynchronize the databases.
This document provides steps to check database synchronization between a primary and standby database. It involves running queries on both the primary and standby to compare archived log sequence numbers and check the standby's applied status. If differences are found, it provides instructions to cancel recovery on the standby, alter the standby mount mode, and re-enable archiving on the primary to resynchronize the databases.
This document provides steps to check database synchronization between a primary and standby database. It involves running queries on both the primary and standby to compare archived log sequence numbers and check the standby's applied status. If differences are found, it provides instructions to cancel recovery on the standby, alter the standby mount mode, and re-enable archiving on the primary to resynchronize the databases.
SQL> select * from (select prod_arch,standby_arch,(prod_arch-standby_arch) difference, '1'
thread# from(select max(sequence#) prod_arch from v$archived_log where dest_id=1 and thread#=1) p,(select max(sequence#) standby_arch from v$archived_log where dest_id=2 and thread#=1 and applied='YES'));
Output result should be:
Difference = 0
Note: if not zero value returns go to the next step
Step # 2: Execute on Standby:
SQL> select sequence#, first_time, applied from v$archived_log order by sequence#;
Step # 3: Execute on Primary:
SQL> select Dest_name,Status,archived_seq#,error FROM V$ARCHIVE_DEST_STATUS where
dest_name='LOG_ARCHIVE_DEST_2';
Step # 4: SQL> select max(sequence#) from v$log_history;
Primary
Standby
Execute below query on Standby:
SQL> select open_mode from v$database;
Note: If database is not in mount state then follow below steps.
SQL> shutdown immediate;
SQL> startup nomount;
SQL> alter database mount standby database;
Before alter this command the database should be on mount state:
alter database recover managed standby database disconnect from session;
Note: Now follow step#1 to step#4 to check standby synchronization.
Cancel Recovery (if Needed):
alter database recover managed standby database cancel;