Oracle Data Guard switchover checklist
Oracle Data Guard switchover checklist
ON STANDBY SITE
SQL> select * from v$version;
BANNER www.zzzyk.com
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 -
64bit Production
64bit Production
PL/SQL Release 11.2.0.3.0 - Production
CORE 11.2.0.3.0 Production
TNS for Linux: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production
SQL> select database_role from v$database;
DATABASE_ROLE www.zzzyk.com
----------------
PHYSICAL STANDBY
SQL> select name,value from v$parameter where name in ('log_archive_dest_1','log_archive_dest_state_1','log_archive_
dest_2','log_archive_dest_state_2');
dest_2','log_archive_dest_state_2');
NAME VALUE
------------------------- -------------------------------------------------------------
log_archive_dest_1 location=/u01/app/oracle/arch
log_archive_dest_2 service=zhongwc async lgwr register valid
_for=(online_logfile,primary_role) db_unique_name=zhongwc
_for=(online_logfile,primary_role) db_unique_name=zhongwc
log_archive_dest_state_1 enable
log_archive_dest_state_2 enable
SQL> select distinct status from v$datafile;
STATUS
-------
ONLINE
SYSTEM
SQL> select distinct open_mode from v$database;
OPEN_MODE
--------------------
READ ONLY WITH APPLY
SQL> SELECT DISTINCT thread#,MAX(SEQUENCE#) OVER
(partition BY thread#) maxseq_ FROM v$archived_log;
(partition BY thread#) maxseq_ FROM v$archived_log;
THREAD# MAXSEQ_
---------- ----------
1 13
SQL> select max(SEQUENCE#) "LAST_LOG_APPLIED" FROM
V$ARCHIVED_LOG WHERE THREAD# = 1 and APPLIED='YES';
V$ARCHIVED_LOG WHERE THREAD# = 1 and APPLIED='YES';
LAST_LOG_APPLIED
----------------
13
ON PRIMARY SITE
SQL> SELECT DISTINCT thread#,MAX(SEQUENCE#) OVER
(partition BY thread#) maxseq_ FROM v$archived_log;
(partition BY thread#) maxseq_ FROM v$archived_log;
THREAD# MAXSEQ_
---------- ----------
1 13
SQL> select max(SEQUENCE#) "LAST_LOG_APPLIED" FROM
V$ARCHIVED_LOG WHERE THREAD# = 1 and APPLIED='YES';
V$ARCHIVED_LOG WHERE THREAD# = 1 and APPLIED='YES';
LAST_LOG_APPLIED
----------------
13