Step-by-Step Applying PSU Patch :
1.Download the latest Opatch Tool and latest patch from My Oracle Support.
p28163133_122010_Linux-x86-64.zip —>PSU patch
p6880880_122010_Linux-x86-64.zip —>Opatch
Review readme file on Patch 28163133.
2.Copy the patch and Opatch to DB Server:
mkdir -p /oradata01/DBNAME/PATCH_MAY
ls -ltr
-rwxrw-rw- 1 oracle dba 271289497 Sep 21 18:52 p28163133_122010_Linux-x86-64.zip
-rwxrw-rw- 1 oracle dba 99183505 Sep 22 00:51 p6880880_122010_Linux-x86-64.zip
3.Unzip both files:
unzip p28163133_122010_Linux-x86-64.zip
unzip p6880880_122010_Linux-x86-64.zip
ls -ltr
drwxr-xr-x 5 oracle dba 4096 May 18 17:14 28163133
drwxr-x— 14 oracle dba 4096 May 18 17:14 OPatch
-rwxrw-rw- 1 oracle dba 271289497 Sep 21 18:52 p28163133_122010_Linux-x86-64.zip
-rwxrw-rw- 1 oracle dba 99183505 Sep 22 00:51 p6880880_122010_Linux-x86-64.zip
-rw-r–r– 1 oracle dba 293839 May 18 17:14 PatchSearch.xml
4.Take Backup of ORACLE_HOME (Rollback plan):
cd $ORACLE_HOME
cd ..
tar -cvf /oradata01/DBNAME/PATCH_MAY/app.tar app/
5.Check the inventory details:
$ORACLE_HOME/OPatch/opatch lsinventory
6.Check Patch status before apply using below query:
SET linesize 200
Set pagesize 200
col action_time FOR a20
col version FOR a10
col comments FOR a20
col action FOR a15
col namespace FOR a10
Col BUNDLE_SERIES for a15
SELECT PATCH_ID,ACTION,STATUS,ACTION_TIME,DESCRIPTION FROM dba_registry_sqlpatch;
7.Check dba_registry component status :
set lin 200
col COMPONENT for a30
SELECT comp_name component, version, status FROM dba_registry;
8.Check the invalid object status and run utlrp:
col owner for a20
col OBJECT_NAME for a30
set lin 200
SELECT DISTINCT object_name, object_type, owner FROM dba_objects
WHERE status=’INVALID’
ORDER BY owner, object_name, object_type;
@$ORACLE_HOME/rdbms/admin/utlrp.sql
9.Shutdown Database and Listener
. oraenv
DBNAME
select name,open_mode,database_role from v$database;
shu immediate;
lsnrctl stop DBNAME
If dba_registry (point 6)not updated then run the following:
cd $ORACLE_HOME/OPatch
./datapatch -verbose
10.Check the OPatch version and Replace the latest OPatch if needed:
$ORACLE_HOME/OPatch/opatch version
cd /oradata01/DBNAME/PATCH_MAY
mv $ORACLE_HOME/OPatch $ORACLE_HOME/OPatch_old
cp -r OPatch $ORACLE_HOME/
$ORACLE_HOME/OPatch/opatch version
11.Check the Conflict Apply PSU patch on ORACLE_HOME:
cd /oradata01/DBNAME/PATCH_MAY/28163133
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph ./
$ORACLE_HOME/OPatch/opatch apply -report
$ORACLE_HOME/OPatch/opatch apply -report
$ORACLE_HOME/OPatch/opatch apply
12.Check the inventory details:
$ORACLE_HOME/OPatch/opatch lsinv
13.Startup the Database:
. oraenv
DBNAME
startup;
14.Run datapatch command:
cd $ORACLE_HOME/OPatch
./datapatch -verbose
15.Check the DBA_REGISTRY_SQLPATCH:
SET linesize 200
Set pagesize 200
col action_time FOR a20
col version FOR a10
col comments FOR a20
col action FOR a15
col namespace FOR a10
Col BUNDLE_SERIES for a15
SELECT PATCH_ID,ACTION,STATUS,ACTION_TIME,DESCRIPTION FROM dba_registry_sqlpatch;
16.Check dba_registry component status :
set lin 200
col COMPONENT for a30
SELECT comp_name component, version, status FROM dba_registry;
17.Check the invalid object status and run utlrp:
col owner for a20
col OBJECT_NAME for a30
set lin 200
SELECT DISTINCT object_name, object_type, owner FROM dba_objects
WHERE status=’INVALID’
ORDER BY owner, object_name, object_type;
@$ORACLE_HOME/rdbms/admin/utlrp.sql
18.Check opatch lsinventory and list of patches applied in ORACLE_HOME
$ORACLE_HOME/OPatch/opatch lsinventory
19.Startup the Listener
lsnrctl start LISTENER
20.Perform remote connectivity and basic sanity of the database:
sqlplus user1@DBNAME
Password