How manually patch Oracle Database
In this tutorial we will how we can patch our Oracle Database using the manual opatch tool.
1- We need to download the patch that we want to apply to our database. This is up to you from where you get your patches.
Place the patch in the tmp dir.
2- Stop the databases that are up to receive the patch. Remember that all other instances that make use of the same Oracle_Home will need to be stopped otherwise you will get an "OPatch failed with error code 41" error.
[ oracle @ DCG023 8828328 ] $ opatch apply
Oracle Interim Patch Installer version 11 . 2 . 0 . 3 . 4
Copyright ( c ) 2012 , Oracle Corporation . All rights reserved .
Oracle Home : / u00 / product / 11 . 2 . 0 / dbhome_1
Central Inventory : / u00 / oraInventory
from : / u00 / product / 11 . 2 . 0 / dbhome_1 / oraInst . loc
OPatch version : 11 . 2 . 0 . 3 . 4
OUI version : 11 . 2 . 0 . 1 . 0
Log file location : / u00 / product / 11 . 2 . 0 / dbhome_1 / cfgtoollogs / opatch / 8828328 _Nov_13_2013_14_00_02 /
apply2013 - 11 - 13 _14 - 00 - 02 PM_1 . log
Applying interim patch '8828328' to OH '/u00/product/11.2.0/dbhome_1'
Verifying environment and performing prerequisite checks ...
Prerequisite check "CheckActiveFilesAndExecutables" failed .
The details are :
Following executables are active :
/ u00 / product / 11 . 2 . 0 / dbhome_1 / bin / oracle
Log file location : / u00 / product / 11 . 2 . 0 / dbhome_1 / cfgtoollogs / opatch / 8828328 _Nov_13_2013_14_00_02 /
apply2013 - 11 - 13 _14 - 00 - 02 PM_1 . log
Recommended actions : OPatch needs to modify files which are being used by some processes .
OPatch failed with error code 41
# Right now let 's stop the database.
[oracle@DCG023 8828328]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Wed Nov 13 14:00:27 2013
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL shutdown immediate;
3- Unzip the patch and go inside it.
[ oracle @ DCG023 patch ] $ unzip p8828328_112010_Linux - x86 - 64 . zip
Archive : p8828328_112010_Linux - x86 - 64 . zip
creating : 8828328 /
creating : 8828328 / files /
creating : 8828328 / files / lib /
creating : 8828328 / files / lib / libserver11 . a /
inflating : 8828328 / files / lib / libserver11 . a / kks . o
inflating : 8828328 / files / lib / libserver11 . a / kksc . o
creating : 8828328 / etc /
creating : 8828328 / etc / config /
inflating : 8828328 / etc / config / inventory . xml
inflating : 8828328 / etc / config / actions . xml
creating : 8828328 / etc / xml /
inflating : 8828328 / etc / xml / GenericActions . xml
inflating : 8828328 / etc / xml / ShiphomeDirectoryStructure . xml
inflating : 8828328 / README . txt
[ oracle @ DCG023 patch ] $ cd 8828328 /
4- List the existing patches applied to your database.
[ oracle @ DCG023 8828328 ] $ opatch lsinventory
Oracle Interim Patch Installer version 11 . 2 . 0 . 3 . 4
Copyright ( c ) 2012 , Oracle Corporation . All rights reserved .
Oracle Home : / u00 / product / 11 . 2 . 0 / dbhome_1
Central Inventory : / u00 / oraInventory
from : / u00 / product / 11 . 2 . 0 / dbhome_1 / oraInst . loc
OPatch version : 11 . 2 . 0 . 3 . 4
OUI version : 11 . 2 . 0 . 1 . 0
Log file location : / u00 / product / 11 . 2 . 0 / dbhome_1 / cfgtoollogs / opatch / opatch2013 - 11 - 13 _13 - 55 - 22 PM_1 . log
Lsinventory Output file location : / u00 / product / 11 . 2 . 0 / dbhome_1 / cfgtoollogs / opatch / lsinv / lsinventory2013 - 11 - 13 _13 - 55 - 22 PM . txt
--------------------------------------------------------------------------------
Installed Top - level Products ( 1 ):
Oracle Database 11 g 11 . 2 . 0 . 1 . 0
There are 1 products installed in this Oracle Home .
Interim patches ( 1 ) :
Patch 8405205 : applied on Mon Aug 19 15 : 18 : 04 BRT 2013
Unique Patch ID : 11805160
Created on 23 Sep 2009 , 02 : 41 : 32 hrs PST8PDT
Bugs fixed :
8405205
--------------------------------------------------------------------------------
OPatch succeeded .
5- Apply the patch using the "apply" option form inside the unzipped patch directory.
[ oracle @ DCG023 8828328 ] $ opatch apply
Oracle Interim Patch Installer version 11 . 2 . 0 . 3 . 4
Copyright ( c ) 2012 , Oracle Corporation . All rights reserved .
Oracle Home : / u00 / product / 11 . 2 . 0 / dbhome_1
Central Inventory : / u00 / oraInventory from : / u00 / product / 11 . 2 . 0 / dbhome_1 / oraInst . loc
OPatch version : 11 . 2 . 0 . 3 . 4
OUI version : 11 . 2 . 0 . 1 . 0
Log file location : / u00 / product / 11 . 2 . 0 / dbhome_1 / cfgtoollogs / opatch / 8828328 _Nov_13_2013_14_03_40 /
apply2013 - 11 - 13 _14 - 03 - 39 PM_1 . log
Applying interim patch '8828328' to OH '/u00/product/11.2.0/dbhome_1'
Verifying environment and performing prerequisite checks ...
All checks passed .
Provide your email address to be informed of security issues , install and
initiate Oracle Configuration Manager . Easier for you if you use your My
Oracle Support Email address / User Name .
Visit http : // www . oracle . com / support / policies . html for details .
Email address / User Name :
You have not provided an email address for notification of security issues .
Do you wish to remain uninformed of security issues ([ Y ] es , [ N ] o ) [ N ]: Y
Please shutdown Oracle instances running out of this ORACLE_HOME on the local system .
( Oracle Home = '/u00/product/11.2.0/dbhome_1' )
Is the local system ready for patching ? [ y | n ]
y
User Responded with : Y
Backing up files ...
Patching component oracle . rdbms , 11 . 2 . 0 . 1 . 0 ...
Verifying the update ...
.....
Patch 8828328 successfully applied
Log file location : / u00 / product / 11 . 2 . 0 / dbhome_1 / cfgtoollogs / opatch / 8828328 _Nov_13_2013_14_03_40 /
apply2013 - 11 - 13 _14 - 03 - 39 PM_1 . log
OPatch succeeded .
6- Verify the applyed patch.
[ oracle @ DCG023 8828328 ] $ opatch lsinventory
Oracle Interim Patch Installer version 11 . 2 . 0 . 3 . 4
Copyright ( c ) 2012 , Oracle Corporation . All rights reserved .
Oracle Home : / u00 / product / 11 . 2 . 0 / dbhome_1
Central Inventory : / u00 / oraInventory
from : / u00 / product / 11 . 2 . 0 / dbhome_1 / oraInst . loc
OPatch version : 11 . 2 . 0 . 3 . 4
OUI version : 11 . 2 . 0 . 1 . 0
Log file location : / u00 / product / 11 . 2 . 0 / dbhome_1 / cfgtoollogs / opatch / opatch2013 - 11 - 13 _14 - 06 - 48 PM_1 . log
Lsinventory Output file location : / u00 / product / 11 . 2 . 0 / dbhome_1 / cfgtoollogs / opatch / lsinv /
lsinventory2013 - 11 - 13 _14 - 06 - 48 PM . txt
--------------------------------------------------------------------------------
Installed Top - level Products ( 1 ):
Oracle Database 11 g 11 . 2 . 0 . 1 . 0
There are 1 products installed in this Oracle Home .
Interim patches ( 2 ) :
Patch 8828328 : applied on Wed Nov 13 14 : 04 : 35 BRST 2013
Unique Patch ID : 11870171
Created on 14 Oct 2009 , 10 : 15 : 56 hrs PST8PDT
Bugs fixed :
8828328
Patch 8405205 : applied on Mon Aug 19 15 : 18 : 04 BRT 2013
Unique Patch ID : 11805160
Created on 23 Sep 2009 , 02 : 41 : 32 hrs PST8PDT
Bugs fixed :
8405205
--------------------------------------------------------------------------------
OPatch succeeded .
Patch applyed.
7- Startup your database.
[ oracle @ DCG023 ~ ] $ sqlplus / as sysdba
SQL * Plus : Release 11 . 2 . 0 . 1 . 0 Production on Wed Nov 13 14 : 05 : 13 2013
Copyright ( c ) 1982 , 2009 , Oracle . All rights reserved .
Connected to an idle instance .
SQL startup ;
ORACLE instance started .
Total System Global Area 2505338880 bytes
Fixed Size 2215944 bytes
Variable Size 1879052280 bytes
Database Buffers 603979776 bytes
Redo Buffers 20090880 bytes
Database mounted .
Database opened .