Patching in Oracle
Patching in Oracle
Step 1:
• Download Patch p34133642_19.16.00_Linux-x86-64
• Make sure the minimum OPATCH version is 12.2.0.1.30
Step 2:
To update the OPATCH version we need to download it first and then replace
it with the existing OPATCH in ORACLE HOME.
Step 3:
After downloading the OPATCH and PATCH copy both files to the Database
server. In my case, I have copied both files to /u02 mount point.
Step 4:
Before updating the OPATCH version, you should check the current version of OPATCH.
$cd $ORACLE_HOME/OPatch
$./opatch version
OPatch Version: 12.2.0.1.17
OPatch succeeded.
Step 5:
In my case the OPATCH version is 12.2.o.1.17 and we need the minimum OPATCH version to be
12.2.0.1.30.
$ cd $ORACLE_HOME/
$mv OPatch OPatch_bkp
Upgrade OPATCH
Upgrade the OPATCH utility, just unzip the newly downloaded opatch utility version in
ORACLE_HOME directly.
$ ./opatch version
OPatch Version: 12.2.0.1.35
OPatch succeeded.
This time you can see the OPATCH version successfully updating.
Step 6:
Step 7:
Rollback Plan
Due to any type of error if patching got failed, then you must have a backup plan.
• Take Oracle Home Backup
• Full Database RMAN Backup or Create Guaranteed Restore Point.
Step 8:
Let's start the preparation for applying the patch. Unzip the path in the /u02 directory using the
following commands.
Note:
Yes, check the prerequisites before applying the patch using the following command.
Check prerequisites
$cd /u02/34133642
$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail
-ph ./
Output from the above query, if everything is fine.
Step 9:
Step 10:
Using the following command applies the patch.
Note:
Make sure 7 GB of disk space is free in your binary location otherwise the patch will be failed.
Step 11:
Step 12:
Step 13:
Execute utlrp.sql
Once datapatch -verbose is completed then execute the utlrp script to
validate the invalid objects.
SQL> @?/rdbms/admin/utlrp.sql
Step 14: