Oracle 11g Hot patching

Online Patching : you can apply or roll back online patches while the RDBMS instance is running

1) download an interim patch for 11g, f.ex. dummy patch 6198642
2) unzip p6198642_111060_LINUX.zip
3) cd 6198642
4) $ORACLE_HOME/OPatch/opatch apply -silent -connectString LSC08 -runSql
Invoking OPatch 11.1.0.6.0

Oracle Interim Patch Installer version 11.1.0.6.0
Copyright (c) 2007, Oracle Corporation. All rights reserved.

Oracle Home : /opt/oracle/product/11/db_4
Central Inventory : /opt/oracle/oraInventory
from : /etc/oraInst.loc
OPatch version : 11.1.0.6.0
OUI version : 11.1.0.6.0
OUI location : /opt/oracle/product/11/db_4/oui
Log file location : /opt/oracle/product/11/db_4/cfgtoollogs/
opatch/opatch2007-12-05_21-23-42PM.log

RollbackSession rolling back interim patch '6198642' from OH
'/opt/oracle/product/11/db_4'

Running prerequisite checks...

OPatch detected non-cluster Oracle Home from the inventory
and will patch the local system only.

Please shutdown Oracle instances running out of this
ORACLE_HOME on the local system.
(Oracle Home = '/opt/oracle/product/11/db_4')

Is the local system ready for patching? [y|n]
Y (auto-answered by -silent)
User Responded with: Y
Backing up files affected by the patch '6198642' for restore.
This might take a while...
Execution of 'sh /opt/oracle/product/11/db_4/.patch_storage/
6198642_May_07_2007_00_50_36/original_patch/custom/
scripts/pre -rollback 6198642 ':

Return Code = 0

Patching component oracle.rdbms, 11.1.0.6.0...
Copying file to "/opt/oracle/product/11/db_4/cpu/CPUDummy2007/
catcpu.sql"
RollbackSession removing interim patch '6198642' from inventory

---------------------------------------------------------------
This is a dummy patch for testing only
---------------------------------------------------------------
Execution of 'sh /opt/oracle/product/11/db_4/.patch_storage/
6198642_May_07_2007_00_50_36/original_patch/custom/scripts/
post -rollback 6198642 ':

Return Code = 0

Running the "apply" sql script "/opt/oracle/product/11/db_4/cpu/
CPUDummy2007/catcpu.sql" with reference to 'patchmd.xml' file
for the patch "6198642"...

The local system has been patched and can be restarted.

OPatch succeeded.

OPatch did run the necessary script (catcpu for Dummy2007) on the various instances (LSC08). It needed only one step and 34 seconds on my notebook. This patch is a dummy patch, let’s wait for CPU January to see if it is online applicable ๐Ÿ˜‰

21 thoughts on “Oracle 11g Hot patching

  1. Periyasamy

    Please shutdown Oracle instances running out of this ORACLE_HOME on the local system?

    Lets wait..

  2. Laurent Schneider Post author

    It is a dummy patch, so this message is misleading, but it apparently is possible to have online patch that should not display that message.

    let’s wait …

  3. Michael Neuburger

    I was curious about the ho tpatching as well. I looked on Metaink and found serveral patches for 11g. I looked at all the README files and they say ” Please shutdown Oracle instances running out of this ORACLE_HOME on the local system”.

    At OOW I was told that 95% of opatches can be applied hot, are these ALL in the 5%? ๐Ÿ™‚

  4. Michael Neuburger

    I have tried a few…

    ApplySession applying interim patch ‘6353873’ to OH ‘/u021/app/oracle/product/11.1.0.6-db’

    Running prerequisite checks…

    OPatch detected non-cluster Oracle Home from the inventory and will patch the local system only.

    Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
    (Oracle Home = ‘/u021/app/oracle/product/11.1.0.6-db’)

  5. James Colestock

    Thanks for the post…this didn’t work for me, for some reason…I even tried patching opatch to a more recent release. All the locations are correct (however unorthodox) including oraInst.loc entry, etc…in your tests, have you run into this particular pre-requisite failure? Thanks!

    [/tmp/6198642 nf@rac2]$ $ORACLE_HOME/OPatch/opatch apply -silent -connectString nf -runSql
    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 : /u03/app/oracle/product/db/11.1.0.6
    Central Inventory : /u03/app/oracle/product/db/11.1.0.6/oraInventory
    from : /etc/oraInst.loc
    OPatch version : 11.1.0.6.2
    OUI version : 11.1.0.6.0
    OUI location : /u03/app/oracle/product/db/11.1.0.6/oui
    Log file location : /u03/app/oracle/product/db/11.1.0.6/cfgtoollogs/opatch/opatch2008-01-30_15-21-00PM.log

    ApplySession applying interim patch ‘6198642’ to OH ‘/u03/app/oracle/product/db/11.1.0.6’

    Running prerequisite checks…
    Prerequisite check “CheckActiveFilesAndExecutables” failed.
    The details are:

    Following executables are active :
    /u03/app/oracle/product/db/11.1.0.6/bin/oracle
    /u03/app/oracle/product/db/11.1.0.6/bin/tnslsnr
    ApplySession failed during prerequisite checks: Prerequisite check “CheckActiveFilesAndExecutables” failed.
    System intact, OPatch will not attempt to restore the system

    OPatch failed with error code 74

  6. GC328

    But I couldn’t find the p6198642 for Windows 32bit anywhere on Oracle’s Metalink site.

  7. GC328

    Let me rephrade that, when I tried OPatch with the latest patch on windows, it says the OPatch file is not recognized as an internal or external command, operable or batch file. Am I right to assume that the opatch file is not compatible with windows? Please advise. Thanks.

  8. Tom

    Might you have forgotten to add the folder where opatch lives to the system path?

  9. GC328

    I figured out the the problem. In my case, I’m patching Oracle v11.1.0.6.0 with patch 6 (#7210195) on a Windows 2003 Server. Here’s what I did:
    1. Shutdown the Instance and all it’s services (backup first). You have to go to manage>services> and manually turn off all Oracle related services and the Distributed Transaction Coordinator (which is not of Oracle)
    2. Replace the contants in OPatch dir with the updated one from Oracle #6880880
    3. Set ORACLE_HOME path to your Oracle Home Directory to something like x:app…product11.1.0db_1
    4. Download and unzip patch 7210195 to x drive same drive as your oracle home
    5. go to the 7210195 folder and run OPatch apply
    6. reboot when patch complete

    I may have skipped some minor step here and there but that’s the basic

    …. now back to playing my xbox ๐Ÿ™‚

  10. DBA

    “There are no hot patches (yet)”.
    That is my proposition.

    There are no technical details available for hot patching, only pre-11g launch marketing materials.

    If there is a counterexample, except the dummy patch, for Oracle database, I will stand corrected.

  11. vivek

    Hi,
    I have also tried hotpatching with dbconsole in windows but it failed,
    not sure when these kind of patches will be available.for minor one-off patches it may be available in future,i hope:)
    –vivek

  12. Pingback: Oracle Database 11.2.0.2 : Online Patch devient rรฉel | ArKZoYd

Comments are closed.