Steps for Applying the
Patch
Execute
the following on each node of the cluster in non-shared CRS and DB home
environment to apply the patch.
1. Stop
the CRS managed resources running from DB homes.
If this is a GI Home
environment, as the database home owner execute:
$ srvctl stop home -o <ORACLE_HOME> -s
<statusfilelocation> -n <node name>
If this is an Oracle
Restart Home environment, as the database home owner execute:
$ <ORACLE_HOME>/bin/srvctl stop home -o
<ORACLE_HOME> -s <status file location>
2. Run
the pre root script.
If this is a GI Home,
as the root user execute:
#
<GI_HOME>/crs/install/rootcrs.pl -prepatch
If this is an Oracle
Restart Home, as the root user execute:
#
<GI_HOME>/crs/install/roothas.pl -prepatch
3.
Patch GI home.
As the GI home owner
execute:
$
<GI_HOME>/OPatch/opatch apply -oh <GI_HOME> -local
<UNZIPPED_PATCH_LOCATION>/%BUGNO%/%OCW TRACKING BUG%
$
<GI_HOME>/OPatch/opatch apply -oh <GI_HOME> -local
<UNZIPPED_PATCH_LOCATION>/%BUGNO%/%ACFS TRACKING BUG%
$
<GI_HOME>/OPatch/opatch apply -oh <GI_HOME> -local
<UNZIPPED_PATCH_LOCATION>/%BUGNO%/%DBWLM TRACKING BUG%
$
<GI_HOME>/OPatch/opatch apply -oh <GI_HOME> -local
<UNZIPPED_PATCH_LOCATION>/%BUGNO%/%RDBMS PSU TRACKING BUG%
4. Patch
DB home.
As the database home
owner execute:
$ <UNZIPPED_PATCH_LOCATION>/%BUGNO%/%OCW
TRACKING BUG%/custom/scripts/prepatch.sh -dbhome <ORACLE_HOME>
$
<ORACLE_HOME>/OPatch/opatch apply -oh <ORACLE_HOME> -local
<UNZIPPED_PATCH_LOCATION>/%BUGNO%/%OCW TRACKING BUG%
$
<ORACLE_HOME>/OPatch/opatch apply -oh <ORACLE_HOME> -local
<UNZIPPED_PATCH_LOCATION>/%BUGNO%/%RDBMS PSU TRACKING BUG%
$
<UNZIPPED_PATCH_LOCATION>/%BUGNO%/%OCW TRACKING
BUG%/custom/scripts/postpatch.sh -dbhome <ORACLE_HOME>
5. Run
the post script
As the root user
execute:
#
<GI_HOME>/rdbms/install/rootadd_rdbms.sh
If this is a GI Home,
as the root user execute:
#
<GI_HOME>/crs/install/rootcrs.pl -postpatch
If this is an Oracle
Restart Home, as the root user execute:
#
<GI_HOME>/crs/install/roothas.pl -postpatch
6.
Start the CRS managed resources that were earlier running from DB homes
If this is a GI Home
environment, as the database home owner execute:
$
<ORACLE_HOME>/bin/srvctl start home -o <ORACLE_HOME> -s <status
file location> -n <node name>
If this is an Oracle
Restart Home environment, as the database home owner execute:
$
<ORACLE_HOME>/bin/srvctl start home -o <ORACLE_HOME> -s <status
file location>
7. For each database
instance running on the Oracle home being patched, run the datapatch utility as
described in next table.
8: Steps to Run the datapatch Utility for Single Tenant Versus
Multitenant (CDB/PDB)
Set environment to
oracle database
cd $ORACLE_HOME/OPatch
./datapatch –verbose
set line 155
select * from
dba_registry_sqlpatch;
SELECT patch_id,
version, status, bundle_id, bundle_series,ACTION_TIME FROM
dba_registry_sqlpatch;
select
owner,object_type,count(*) from dba_objects where status='INVALID' group by
owner,object_type order by owner,object_type ;
@$ORACLE_HOME/rdbms/admin/utlrp.sql
Reference: Patch Installation and Deinstallation for 12.1.0.x.x GI PSU and
Database Proactive Bundle Patch (Doc ID 1591616.1)