How do you patch standalone Oracle Database and how long it takes?
...
Patching primary and standby database can done partly online, but downtime will always be needed. In this example we won’t make any attempt to shorten the downtime.
A. ONLINE: First step is to stop Dbvisit automated standby update on primary server:
Code Block |
---|
$ /usr/dbvisit/standbymp/bin/dbvagentmanager auto-update modify --disable Trace log will be written to '/usr/dbvisit/standbymp/log/trace/dbvagentmanager_auto-update_modify_826809.trace.log'. Will update configuration SLASH (Oracle) between czlin0231 and czlin0232 (currently ENABLED with an interval of 300 seconds) to be DISABLED with an interval of 300 seconds ? Update 1 configuration(s) - are you sure? Yes Successfully updated configuration SLASH (Oracle) between czlin0231 and czlin0232 |
B. ONLINE: second step is to stop all oracle processes on standby server:
Code Block |
---|
$ echo "shu abort" | sqlplus / as sysdba; lsnrctl stop |
C. ONLINE: run OPATCH part of the patch on standby server:
...
This was the last step which you can done online, now you have to start downtime for your production. You can of course wait till you proceed with next step (even few days). In that case for the duration of the wait you should start the standby database back to MOUNT mode and enable again the automated standby update.
D. DOWNTIME: you will need to stop all oracle processes on your primary server now (Make sure the automated standby update is stopped before):
Code Block |
---|
$ echo "shu immediate" | sqlplus / as sysdba; lsnrctl stop |
E. DOWNTIME: once done, run the OPATCH part on your primary server:
...
When the OPATCH part finishes, you’ll be able to start back your primary database online and end the downtime.
F: ONLINE: Start Primary Database and apply the DATAPATCH part on primary server:
...
This depends on your exact application and database. You’ll have to test this and make a call whether to allow clients to the production database before the DATAPATCH completes or not.
G. ONLINE: Start Dbvisit automated standby update on primary server:
...
You can apply the OPATCH part on the standby oracle database home (this is done online) and then use Dbvisit Switchover process to start the standby database read-write. So the only downtime needed will be for the Dbvisit switchover (step OS command details are the same as above):
A. ONLINE: First step is to stop Dbvisit automated standby update on primary server
B. ONLINE: second step is to stop all oracle processes on standby server
C. ONLINE: run OPATCH part of the patch on standby server
D. DOWNTIME: now you will need to stop your application and initiate Dbvisit database switchover
...
Wait until switchover completes which typically takes ~ 5-10 minutes. Now your new primary database which is running from former standby oracle home which has already applied the OPATCH part is ready for running the DATAPATCH and can be opened to clients.
F: ONLINE: Apply the DATAPATCH part on new primary server (formerly standby)
G: ONLINE: Apply the OPATCH part on new standby server (formerly primary)
H: ONLINE: Start Dbvisit automated standby update on new primary server (formerly standby)
...