How to apply Oracle Database Patches in Linux?
This guide explains how to apply database patches into oracle database and oracle home running on Unix/Linux/ Aix etc.
First, we need to download the required patch from oracle support or metalink.
Then ftp/scp the patch in a shared path on the server.
Login to the server:
Setup environment variables.
ORACLE_SID=devORACLE_HOME=/u01/app/oracleORACLE_BASE=/u01/appPATCH_TOP=<Temporary location where the patch is staged>PATH=$ORACLE_HOME/OPatch:$PATCH_TOP:$PATH:.
cd $ORACLE_HOMEmv OPatch OPatch.origmv $PATCH_TOP/p6880880_19000_<platform>.zip .unzip p6880880*.zip
opatch version
opatch lsinventorycd $PATCH_TOP/<patch_folder>opatch prereq CheckConflictAgainstOHWithDetail -ph ./
This will check for any conflicts for the patch. If there any conflicts roll it back with the below command:
opatch rollback -id <patch number shown in the conflict check log.>
Now run opatch apply, and wait for two prompts and select yes both the time.
sqlplus / as sysdba
shut immediate
exit
opatch apply
It completes the patching, now we need to apply datapatch verbose to update the database registry running on that oracle home.
sqlplus / as sysdba
startup upgrade
exit
datapatch verbose
This finishes the patching. Now do a full restart of the database.
sqlplus / as sysdba
shut immediate
startup
exit
lsnrctl start -> to start the listener
Now, test the connectivity and confirm whether the application/ clients are able to connect to the system.
For issues like opatch failed with error 73, please read this article OPatch Error 73
If you find this useful or any error, please leave a comment.
Best Wishes!!
No comments:
Post a Comment
If you have any queries/ any suggestion please do comment and let me know.