Showing posts with label DATAGAURD. Show all posts
Showing posts with label DATAGAURD. Show all posts

Thursday, 23 May 2013

Switchover from primary to standby

1. Check switchover status before switching database.

SQL>select switchover_status from v$database;
You must see “TO_STANDBY” as result.
Otherwise
2. SQL>alter system switch logfile;

3. Switch primary database to standby database.
SQL>alter database commit to switchover to physical standby with session shutdown;
 SQL>shutdown immediate;
 SQL>startup nomount;
 
4.SQL>alter database mount standby database;
 
Defer for archive log apply. Because I didn’t set my standby database as primary yet.
 
5. SQL>alter system set log_archive_dest_state_2=defer;
 
 
Switch standby database to primary. Check switchover status before switching database