You are on page 1of 3

DATABASE SYNCRONIZATION CHECK

Step # 1:
Execute on Primary:

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;

Execute below command from primary (If needed):

ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE_2=DEFER;

ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE_2=ENABLE;

You might also like