You are on page 1of 4

Follow these steps for CPU patch at OS and DB level ::

========================================
1.Take backup of Oracle Home
goto home location: tar -cvf /oradepot/wrk/11.1.0.7_bkp.tar *
Example :
--------Go to home location.
Take backup of home binaries in any backup location.
cd /GPM/sw/A/oracle/product/11.1.0
tar -cvf /oradepot/wrk/11.1.0_bkp.tar *
-rw-r----- 1 gpmoraa
dba
[gpmoraa@hpx186:/oradepot/wrk]
$ pwd
/oradepot/wrk

6844456960 Aug 4 07:10 11.1.0_bkp.tar

2. Take backup of orainventory


goto orainventory location : tar -cvf orainven.tar *
Example :
--------Go to orainventory.
Take backup of orainventory in any backup location.
cd /GPM/sw/A/oracle
tar -cvf /oradepot/wrk/oraInventory.tar *
-rw-r----- 1 gpmoraa
dba
-rw-r----- 1 gpmoraa
dba
[gpmoraa@hpx186:/oradepot/wrk]

6844456960 Aug 4 07:10 11.1.0_bkp.tar


7139850240 Aug 4 07:25 oraInventory.tar

3.take backup of crontab


crontab -l > crontabbak
4. Remove the crontab
crontab -r
5. stop the agent
Example:
------Agent is not running..
$ ps -ef|grep emagent
gpmoraa 14530 9675 0 07:27:46 pts/5
[gpmoraa@hpx186:/oradepot/wrk]
$ ps -ef | grep emagent

0:00 grep emagent

gpmoraa 14614 9675 0 07:27:57 pts/5


0:00 grep emagent
[gpmoraa@hpx186:/oradepot/wrk]
$ cat /etc/oratab|grep -i agent
#agent:/Oraagent/oracle/product/agent/agent10g:Y:oraagent #Oracle Grid agent Hom
e
agent:/oem/agent12c/core/12.1.0.3.0:N
[gpmoraa@hpx186:/oradepot/wrk]
6. stop listener
Example:
------$ ps -ef|grep pmon|grep -i PPRUX198
gpmoraa 15488
1 0 Aug 3 ?
$ ps -ef|grep tns|grep -i PPRUX198
gpmoraa 5013
1 0 Mar 23 ?
bin/tnslsnr LSN_PPRUX198 -inherit

0:33 ora_pmon_PPRUX198
25:12 /GPM/sw/A/oracle/product/11.1.0/

LSNRCTL> stop LSN_PPRUX198


Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=hpxs152.ncsbe.eu.jnj.com
)(PORT=2778)))
The command completed successfully
LSNRCTL> exit
7. stop databases
Example:
------SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>

8.export the patch


export PATH=/usr/ccs/bin:$PATH
export PATH=$ORACLE_HOME/OPatch:$PATH

9.check the opatch version


It should be minimum 10.2.0.4.8
Example:
-----Checked Optach version and it is higher than 10.2.0.4.8
[gpmoraa@hpx186:/GPM/sw/A/oracle/product/11.1.0/OPatch]
$ opatch lsinventory
Invoking OPatch 11.1.0.6.2

Oracle Interim Patch Installer version 11.1.0.6.2


Copyright (c) 2007, Oracle Corporation. All rights reserved.
Oracle Home
: /GPM/sw/A/oracle/product/11.1.0
Central Inventory : /ESS/sw/D/oracle/oraInventory
from
: /var/opt/oracle/oraInst.loc
OPatch version
: 11.1.0.6.2
OUI version
: 11.1.0.7.0
OUI location
: /GPM/sw/A/oracle/product/11.1.0/oui
Log file location : /GPM/sw/A/oracle/product/11.1.0/cfgtoollogs/opatch/opatch201
4-08-04_07-35-23AM.log

10.goto the patch location


cd $ORACLE_HOME/temp_patch/92****
opatch napply -skip_subset -skip_duplicate -invPtrLoc $ORACLE_HOME/oraInst.lo
c
Example:
-----cd /orasoft/HP-UX_IA64/rdbms/P11.1.0.7/CPUJUL2013/16742110
$ /GPM/sw/A/oracle/product/11.1.0/OPatch/opatch napply -skip_subset -skip_duplic
ate
Invoking OPatch 11.1.0.6.2
Oracle Interim Patch Installer version 11.1.0.6.2
Copyright (c) 2007, Oracle Corporation. All rights reserved.
UTIL session
Oracle Home
: /GPM/sw/A/oracle/product/11.1.0
Central Inventory : /GPM/sw/A/oracle/oraInventory
from
: /var/opt/oracle/oraInst.loc
OPatch version
: 11.1.0.6.2
OUI version
: 11.1.0.7.0
OUI location
: /GPM/sw/A/oracle/product/11.1.0/oui
Log file location : /GPM/sw/A/oracle/product/11.1.0/cfgtoollogs/opatch/opatch201
4-08-04_11-37-10AM.log
Invoking utility "napply"
Checking conflict among patches...
Checking if Oracle Home has components required by patches...
Skip patch 10336548 from list of patches to apply: This patch is not needed.
Checking skip_duplicate
These patches will be skipped because they are duplicates of some patch(es) in t
he Oracle Home: 8342506
OPatch continues with these patches: 10009173,10009222,10009229,10009241,1000924
6,10336525,10336560,10336577,11807271,11807283,11807293,11807302,12560374,125603
85,12560386,12560390,12560400,12560404,12560405,12560459,12687462,12984367,12984
369,13000884,13358127,13737033,13737035,13737036,13737037,13737038,13737040,1373
7041,13737043,14141299,14141301,14488891,14488892,15890514,15890515,15890516,158
90517,15890518,15890519,15890520,15890521,15890522,16359931,16359932,16610144,16
742110,16946578,16946579,16946580,16946581,16946582,16946583,8563942,8563943,856

3944,8563946,8563947,8563948,8855553,8855565,8855570,8855577,9118620,9458814,945
8819,9702142,9702143
Checking skip_subset
Checking conflicts against Oracle Home...

==========
11.cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> STARTUP
SQL> @catbundle.sql cpu apply
SQL> QUIT
12.run SELECT * FROM registry$history where ID = '6452863';
if this return no rows, then
cd $ORACLE_HOME/cpu/view_recompile
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> SHUTDOWN IMMEDIATE
SQL> STARTUP UPGRADE
SQL> @view_recompile_jan2008cpu.sql
SQL> SHUTDOWN;
SQL> STARTUP;
SQL> QUIT
13.run utlrp
do step 11,12 and 13 in all databases under that home.
14. start listener and agent
15. restore crontab
$ crontab crontabbak
THE END

opatch prereq CheckConflictAgainstOHWithDetail -ph ./12419258

You might also like