CHECKLIST BEFORE SWITCHOVER OPERATION
=======================================
Please note
log_archive_dest_state_3 :(archive dest for standby database)
log_archive_dest_state_1 :(archive dest for primary database)
SELECT PROTECTION_MODE FROM V$DATABASE;
SQL> select name,value from v$parameter where name in ('log_archive_dest_1','log_archive_dest_state_1','log_archive_dest_3','log_archive_dest_state_3);
Make sure 'lgwr' and not 'arch' is mentioned here, otherwise new primary database will not open after switchover (if the protection_mode is Maximum availability).
-- on standby database--
SQL> select database_role from v$database;
DATABASE_ROLE
----------------
PHYSICAL STANDBY
-- on primary --
SQL> select database_role from v$database;
DATABASE_ROLE
----------------
PRIMARY
SQL>select name,value from v$parameter where name in ('log_archive_dest_1','log_archive_dest_state_1', 'log_archive_dest_3','log_archive_dest_state_3);
log_archive_dest_state_3
------------------
DEFER --->DO NOT PROCEED.
issue this command : sql> alter system set log_archive_dest_state_3='ENABLE' scope=both;
---- on primary ----
SQL> select distinct status from v$datafile;
STATUS
——-
ONLINE
SYSTEM
If any file(s) are in RECOVER status, DO NOT PROCEED with the switchover
-- on standby database--
SQL> select distinct open_mode from v$database;
OPEN_MODE
———-
MOUNTED --->PROCEED with switchover.
SQL> select distinct open_mode from v$database;
OPEN_MODE
———-
READ ONLY --->DO NOT PROCEED with switchover.
To confirm that logs are being shipped and more importantly the LAST LOG archived has been applied…
---- on primary ----
SQL> select max(SEQUENCE#) “LAST_LOG_GENERATED” FROM V$ARCHIVED_LOG WHERE THREAD# =1 and ARCHIVED=’YES’;
LAST_LOG_GENERATED
——————
3988
-- on standby database--
SQL> select max(SEQUENCE#) “LAST_LOG_APPLIED” FROM V$ARCHIVED_LOG WHERE THREAD# = 1 and APPLIED=’YES’;
LAST_LOG_APPLIED
—————-
3988
---> PROCEED
=======================================
Please note
log_archive_dest_state_3 :(archive dest for standby database)
log_archive_dest_state_1 :(archive dest for primary database)
SELECT PROTECTION_MODE FROM V$DATABASE;
SQL> select name,value from v$parameter where name in ('log_archive_dest_1','log_archive_dest_state_1','log_archive_dest_3','log_archive_dest_state_3);
Make sure 'lgwr' and not 'arch' is mentioned here, otherwise new primary database will not open after switchover (if the protection_mode is Maximum availability).
-- on standby database--
SQL> select database_role from v$database;
DATABASE_ROLE
----------------
PHYSICAL STANDBY
-- on primary --
SQL> select database_role from v$database;
DATABASE_ROLE
----------------
PRIMARY
SQL>select name,value from v$parameter where name in ('log_archive_dest_1','log_archive_dest_state_1', 'log_archive_dest_3','log_archive_dest_state_3);
log_archive_dest_state_3
------------------
DEFER --->DO NOT PROCEED.
issue this command : sql> alter system set log_archive_dest_state_3='ENABLE' scope=both;
---- on primary ----
SQL> select distinct status from v$datafile;
STATUS
——-
ONLINE
SYSTEM
If any file(s) are in RECOVER status, DO NOT PROCEED with the switchover
-- on standby database--
SQL> select distinct open_mode from v$database;
OPEN_MODE
———-
MOUNTED --->PROCEED with switchover.
SQL> select distinct open_mode from v$database;
OPEN_MODE
———-
READ ONLY --->DO NOT PROCEED with switchover.
To confirm that logs are being shipped and more importantly the LAST LOG archived has been applied…
---- on primary ----
SQL> select max(SEQUENCE#) “LAST_LOG_GENERATED” FROM V$ARCHIVED_LOG WHERE THREAD# =1 and ARCHIVED=’YES’;
LAST_LOG_GENERATED
——————
3988
-- on standby database--
SQL> select max(SEQUENCE#) “LAST_LOG_APPLIED” FROM V$ARCHIVED_LOG WHERE THREAD# = 1 and APPLIED=’YES’;
LAST_LOG_APPLIED
—————-
3988
---> PROCEED
Thanks
No comments:
Post a Comment