Question

I needed to apply a security patch to production database. To minimize the outage time, I cloned the oracle home and applied the patch to this newly created oracle home. With production DB there is a physical standby database. I cloned the oracle home in standby database too and applied the same patch. Now , I need to point both the databases to respective new Oracle home. Guide me on how to do this when there is a physical stand by involved.

I went through multiple oracle blogs etc. the steps provided are to apply the patch simultaneously on both primary and stand by database. However , in my case i have cloned the Oracle homes in both the environments. I could not find any useful info on doing this way. Any help/hints are appreciated.

Was it helpful?

Solution

With Grid Infrastructure, you need to modify the configuration with srvctl, for example after upgrading to a new release:

srvctl stop database -d db_unique_name
export ORACLE_HOME=<..new home...>
export PATH=$ORACLE_HOME/bin:$PATH
srvctl upgrade database -d db_unique_name -o oracle_home

Alternatively you can just re-register the database (add back with srvctl from the new home):

srvctl remove database -d db_unique_name
export ORACLE_HOME=<..new home...>
export PATH=$ORACLE_HOME/bin:$PATH
srvctl add database -d dbname -o oracle_home ...

Without Grid Infrastructure, you can start your databases manually, or with a custom script. You need to modify these scripts and update ORACLE_HOME in them. Also, you need to update /etc/oratab if you are on a UNIX/Linux platform. This is also needed if you use the scripts provided by Oracle (dbstart and dbshut).

If you do not have any scripts for starting and stopping the databases, all you need to do is:

shutdown immediate
export ORACLE_HOME=<..new home...>
export PATH=$ORACLE_HOME/bin:$PATH
sqlplus / as sysdba
startup

Finally, do not forget to copy other configuration files from the old home (pfile/spfile, listener.ora, tnsnames.ora, sqlnet.ora, etc.).

Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange
scroll top