Tuesday, May 5, 2020

Rollback 18 Patch back to Prior Patch Level with Change ORACLE_HOME

** Procedure assumes ORACLE_HOME rolling back to is already in place at patch level you want to rollback.

1. Stop any golden gate processes when golden gate in use for database affected.


2. for each database go back to prior 18c Patch Level with different ORACLE_HOME
. oraenv

srvctl stop database -d  


3. modify the /etc/oratab for the database instances to goto new ORACLE_HOME
Example:
/u01/app/oracle/product/18.0.0.0/dbhome_2


4. move the glogin.sql out of the way for the changes, this would be for the 18 home in this case when used
mv $ORACLE_HOME/sqlplus/admin/glogin.sql $ORACLE_HOME/sqlplus/admin/glogin.sql.save



5. for each database from one node run the datapatch this will set back to prior 18 patch level
   Execute this on the same node where original datapatch was execute for update originally.
. oraenv

srvctl stop database -d  
cd $ORACLE_HOME/OPatch
sqlplus / as sysdba
startup nomount
alter system set cluster_database=false scope=spfile;
shutdown immediate
startup upgrade
exit
./datapatch -verbose
sqlplus / as sysdba
alter system set cluster_database=true scope=spfile;
shutdown immediate
exit


6. Change the ORACLE_HOME for the cluster config for each database
. oraenv

srvctl modify database -d -oraclehome /u01/app/oracle/product/18.0.0.0/dbhome_2


7. Restart database with new home via cluster config
srvctl start database -d


8. put the glogin back in place when used
mv $ORACLE_HOME/sqlplus/admin/glogin.sql.save $ORACLE_HOME/sqlplus/admin/glogin.sql


9. Update Golden Gate prm files for new ORACLE_HOME


10. Restart Golden Gate Processes
cd /ggs
./ggsci
start mgr
start jagent
start *

No comments: