This article is written and tested in oracle 9.2.0.8. Please remember, Oracle11g has Active Data Guard and it will be different steps. Please do not follow this topic for Oracle 11g and above version!
Please refer Click for Oracle11g standby database bounce.
Startup and shutdown the standby database is different then the Primary database. If we want to shutdown the primary and standby database both, it would be better to shutdown primary DB first, then shutdown the standby DB. If we shutdown the PRIMARY DB first, then all the changes will be shipped to standby.
Shutdown procedure for Primary/standby
Step1 : Tail the alert log for primary and standby.
Login to primary and standby server and tail the alert log as below.
tail -f alert_$ORACLE_SID.log
Step2 : Make sure application is down and no activity on the database.
Step3 : To be safer side, switch the log file few times and flush out the redo logs. Then shutdown the primary database.
alter system archive log current;
alter system archive log current;
alter system archive log current;
shutdown immediate;
Just make sure all the archive logs are shipped to standby.
Step4 : Once the primary DB shutdown is successful, then steps to shutdown standby DB.
alter database recover managed standby database cancel;
shutdown immediate
Startup procedure for Primary/standby
Step1 : Start the primary database
startup
Application team can start the application against the primary database.
Enable the log shipping in primary database.
alter system set log_archive_dest_state_2='ENABLE' scope=both;
At this point, you might see some error message on alert log. since primary is trying to connect standby and still standby is not yet up and running.
Step2 : Start the standby database
startup nomount
alter database mount standby database;
alter database recover managed standby database disconnect from session
Watch out the alert log and make sure log shipping is working fine and no error on the alert log. Verify the v$archived_log and make sure archive logs are applying on standby database.
Please remember, the above steps works till Oracle10g. Starting from Oracle11g, Oracle introduced Active Data Guard and it will be different steps to bounce the standby data base. Please click here to view the steps to bounce the Oracle11g Active Data Guard.
Please refer Click for Oracle11g standby database bounce.
Startup and shutdown the standby database is different then the Primary database. If we want to shutdown the primary and standby database both, it would be better to shutdown primary DB first, then shutdown the standby DB. If we shutdown the PRIMARY DB first, then all the changes will be shipped to standby.
Shutdown procedure for Primary/standby
Step1 : Tail the alert log for primary and standby.
Login to primary and standby server and tail the alert log as below.
tail -f alert_$ORACLE_SID.log
Step2 : Make sure application is down and no activity on the database.
Step3 : To be safer side, switch the log file few times and flush out the redo logs. Then shutdown the primary database.
alter system archive log current;
alter system archive log current;
alter system archive log current;
shutdown immediate;
Just make sure all the archive logs are shipped to standby.
Step4 : Once the primary DB shutdown is successful, then steps to shutdown standby DB.
alter database recover managed standby database cancel;
shutdown immediate
Startup procedure for Primary/standby
Step1 : Start the primary database
startup
Application team can start the application against the primary database.
Enable the log shipping in primary database.
alter system set log_archive_dest_state_2='ENABLE' scope=both;
At this point, you might see some error message on alert log. since primary is trying to connect standby and still standby is not yet up and running.
Step2 : Start the standby database
startup nomount
alter database mount standby database;
alter database recover managed standby database disconnect from session
Watch out the alert log and make sure log shipping is working fine and no error on the alert log. Verify the v$archived_log and make sure archive logs are applying on standby database.
Please remember, the above steps works till Oracle10g. Starting from Oracle11g, Oracle introduced Active Data Guard and it will be different steps to bounce the standby data base. Please click here to view the steps to bounce the Oracle11g Active Data Guard.
No comments:
Post a Comment