Step-by-step guide to January 2016 PSU patch apply on 12c drid and RDBMS homes in Linux
Following is a comprehensive step-by-step action plan for a single instance database stored on ASM in version 12.1.0.2 on Linux (OEL 6 64-bit). This guide outlines the essential phases from utility updates to final database verification.
1. Initial Environment Preparation
Before executing the patch, the environment must be synchronized with the latest Oracle utilities and the inventory must be verified for consistency.
Update the OPATCH Utility
Ensure that both the Database and Grid homes are using the most recent version of OPatch.
- For Database home:
$ unzip p6880880_121010_LINUX.zip -d /u01/app/oracle/product/12.1.0/db_1$ /u01/app/oracle/product/12.1.0/db_1/OPatch/opatch version - For Grid home:
$ unzip p6880880_121010_LINUX.zip -d /u01/app/oracle/12.1.0.2/grid$ /u01/app/oracle/12.1.0.2/grid/OPatch/opatch version
Create the ocm.rsp File
The Oracle Configuration Manager response file is required for silent or automated patch applications.
Note: Press Enter/Return key and don't provide any input; select Yes when prompted.
$ export ORACLE_HOME=/u01/app/oracle/12.1.0.2/grid
$ $ORACLE_HOME/OPatch/ocm/bin/emocmrsp -no_banner -output /stage/ocm.rsp
Validation of Oracle Inventory
Check the consistency of inventory information for the GI home and each database home. Run the following commands to ensure the components are listed correctly.
- For database home:
$ /u01/app/oracle/product/12.1.0/db_1/OPatch/opatch lsinventory -detail -oh /u01/app/oracle/product/12.1.0/db_1 - For Grid home:
$ /u01/app/oracle/12.1.0.2/grid/OPatch/opatch lsinventory -detail -oh /u01/app/oracle/12.1.0.2/grid
2. Patch Staging and Conflict Analysis
This phase involves preparing the physical patch files and running a dry-run analysis to identify potential conflicts with existing one-off patches.
Stage the Patch
Unzip the patch files into a clean staging directory using the grid home owner account.
$ mkdir /stage/PSUpatch
$ cp /stage/p22191349_121020_Linux-x86-64.zip /stage/PSUpatch
$ cd /stage/PSUpatch
$ unzip p22191349_121020_<platform>.zip
One-off Patch Conflict Detection and Resolution
Use the -analyze flag with opatchauto to identify identical or conflicting patches.
- Run analysis as root:
/u01/app/oracle/12.1.0.2/grid/OPatch/opatchauto apply /stage/PSUpatch/22191349 -analyze -ocmrf /stage/ocm.rsp - Rollback Conflicts: If identical patches are found (e.g., 21436941, 21948341), rollback the existing ones using:
opatch rollback -id 21948354 -local -oh /u01/app/oracle/12.1.0.2/grid - Handle Service Issues: If rollback fails, stop the HAS services:
/u01/app/oracle/12.1.0.2/grid/bin/crsctl stop has -f - Restart Services: Use
$ORA_GI_HOME/crs/install/roothas.pl –postpatchto restart services if necessary before re-running the analysis.
3. Patch Application and Database Updates
Once the analysis is clean, you can proceed to the physical application of the patch and the subsequent SQL updates within the database.
Apply the Patch
While opatchauto is designed to patch both GI and RDBMS homes, it is essential to verify the RDBMS Home manually afterward.
- Execute as root:
# /u01/app/oracle/12.1.0.2/grid/OPatch/opatchauto apply /stage/PSUpatch/22191349 -ocmrf /stage/ocm.rsp - Manual RDBMS Application (If needed):If the RDBMS home is not updated, run
opatchautospecifically for that home or useopatch applyfor the individual components after shutting down the database.
Loading Modified SQL Files into the Database
After the software is patched, the database must be updated to include the modified SQL files using the datapatch utility.
% sqlplus /nolog SQL> Connect / as sysdba SQL> startup SQL> quit % cd $ORACLE_HOME/OPatch % ./datapatch -verbose
Final Verification
Confirm the list of patches applied to the database by querying the registry.
SQL> select action_time, patch_id, patch_uid, version, status, bundle_series, description from dba_registry_sqlpatch;
Summary of Tasks and ETAs
| Step | Description | ETA |
| 1 | Update the OPATCH utility | 15 min |
| 2 | Create ocm.rsp file | 5 min |
| 3 | Validation of Oracle Inventory | 5 min |
| 4 | Stage the Patch | 5 min |
| 5 | One-off Patch Conflict Detection | 10 min |
| 6 | Apply the Patch | 60 min |
| 7 | Loading Modified SQL Files | 60 min |
| 8 | Final Patch Verification | 5 min |
Oracle Database Consulting Services
Ready to optimize your Oracle Database for the future?
Share this
Share this
More resources
Learn more about Pythian by reading the following blogs and articles.
Enabling achivelog mode in 12c RAC database
A Step-by-Step Flashback of RAC database to Restore Point
How to Install Oracle 12c RAC: A Step-by-Step Guide
Ready to unlock value from your data?
With Pythian, you can accomplish your data transformation goals and more.