Home > 11g, Blogroll, dba, installation > Oracle 11g Hot patching

Oracle 11g Hot patching

December 5th, 2007

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 ;-)

Bookmark and Share

  1. Periyasamy
    December 6th, 2007 at 07:39 | #1

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

    Lets wait..

  2. December 6th, 2007 at 10:54 | #2

    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
    December 6th, 2007 at 19:23 | #3

    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. December 14th, 2007 at 17:48 | #4

    @Michael
    maybe Oracle dev just copy+paste readme file of old version :)

  5. Michael Neuburger
    January 2nd, 2008 at 22:27 | #5

    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’)

  6. January 2nd, 2008 at 23:31 | #6

    yes, let’s wait to see if cpu jan2008 is hot patchable…

  7. January 30th, 2008 at 23:32 | #7

    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

  8. February 1st, 2008 at 09:08 | #8

    anymore info in the log that can help you?

  9. February 2nd, 2008 at 05:23 | #9

    Thanks for the respnose. Unfortunately not…Could always be “user-error” (i.e. ‘me’ :) ) though…

  10. February 2nd, 2008 at 07:38 | #10

    All the locations are correct (however unorthodox) including oraInst.loc entry
    maybe to it is related to orthodoxy …

  11. gsalem
    March 12th, 2008 at 18:59 | #11

    James,
    for your opatch error, try copying fuser from /bin to /sbin

    rgds

  12. July 16th, 2008 at 21:56 | #12

    Do you have the same guide to patch oracle 11g on windows server 2003?

  13. July 16th, 2008 at 22:00 | #13

    the OPATCH options are identical. I cannot confirm if the dummy patch exists on Windows.

  14. July 16th, 2008 at 23:24 | #14

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

  15. July 16th, 2008 at 23:48 | #15

    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.

  16. Tom
    July 21st, 2008 at 20:32 | #16

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

  17. July 22nd, 2008 at 01:54 | #17

    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\…\product\11.1.0\db_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 :)

  18. DBA
    November 12th, 2008 at 06:04 | #18

    “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.

  19. November 12th, 2008 at 08:45 | #19

    only pre-11g launch marketing materials.

    seems so

  20. October 31st, 2009 at 21:09 | #20

    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

  1. No trackbacks yet.