Tuesday, January 1, 2008

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

No comments:

Some/All/Major of the blog content is not mine and i'm not the writer of it, all rights reserved to the authors.