Post by James Gardner on Dec 12, 2013 15:22:51 GMT
Came across this today something that I have been waiting for for a while. Online patching. You cannot do it with all patches the readme supplied with the patch will tell you if it is possible but the results of some playing this morning below. The only overhead that I can see is additional memory usage (no of processes x size pch file supplied in patch) and tracking so you know who has what.
Patch can be applied to home once with a single instance, enabled by default but can then be disabled at a later date or backed out. Examples show using sys and pw : separated but leaving blank allows users with sysdba to apply. NOTE - It is strongly recommended to rollback all online patches and replace them with regular (offline) patches on next instance shutdown
oracle@bdhn4914:SID=jamet101> /opt/oracle/product/11.2.0.3.cpuApr12/OPatch/opatch apply online -connectString jamet101::
Oracle Interim Patch Installer version 11.2.0.3.0
Copyright (c) 2012, Oracle Corporation. All rights reserved.
Oracle Home : /opt/oracle/product/11.2.0.3.cpuApr13
Central Inventory : /opt/oracle/oraInventory
from : /opt/oracle/product/11.2.0.3.cpuApr13/oraInst.loc
OPatch version : 11.2.0.3.0
OUI version : 11.2.0.3.0
Log file location : /opt/oracle/product/11.2.0.3.cpuApr13/cfgtoollogs/opatch/8547978_Dec_12_2013_05_08_08/apply2013-12-12_05-08-08AM_1.log
The patch should be applied/rolled back in '-all_nodes' mode only.
Converting the RAC mode to '-all_nodes' mode.
Applying interim patch '8547978' to OH '/opt/oracle/product/11.2.0.3.cpuApr13'
Verifying environment and performing prerequisite checks...
All checks passed.
Backing up files...
Patching component oracle.rdbms, 11.2.0.3.0...
Installing and enabling the online patch 'bug8547978.pch', on database 'jamet101'.
Verifying the update...
Patch 8547978 successfully applied
Log file location: /opt/oracle/product/11.2.0.3.cpuApr13/cfgtoollogs/opatch/8547978_Dec_12_2013_05_08_08/apply2013-12-12_05-08-08AM_1.log
OPatch succeeded.
Can later be applied to other instances :
/opt/oracle/product/11.2.0.3.cpuApr12/OPatch/opatch util enableonlinepatch -connectString paige101:: -id 8547978
Oracle Interim Patch Installer version 11.2.0.3.0
Copyright (c) 2012, Oracle Corporation. All rights reserved.
Oracle Home : /opt/oracle/product/11.2.0.3.cpuApr13
Central Inventory : /opt/oracle/oraInventory
from : /opt/oracle/product/11.2.0.3.cpuApr13/oraInst.loc
OPatch version : 11.2.0.3.0
OUI version : 11.2.0.3.0
Log file location : /opt/oracle/product/11.2.0.3.cpuApr13/cfgtoollogs/opatch/opatch2013-12-12_05-20-55AM_1.log
Invoking utility "enableonlinepatch"
Installing and enabling the online patch 'bug8547978.pch', on database 'paige101'.
OPatch succeeded.
Disabled or removed:
oracle@bdhn4914:SID=jamet101> $ORACLE_HOME/OPatch/opatch util DisableOnlinePatch -connectString paige101:: -ph /var/opt/vgvd01/u01/oracle/tmp/8547978/online
Oracle Interim Patch Installer version 11.2.0.3.0
Copyright (c) 2012, Oracle Corporation. All rights reserved.
Oracle Home : /opt/oracle/product/11.2.0.3.cpuApr13
Central Inventory : /opt/oracle/oraInventory
from : /opt/oracle/product/11.2.0.3.cpuApr13/oraInst.loc
OPatch version : 11.2.0.3.0
OUI version : 11.2.0.3.0
Log file location : /opt/oracle/product/11.2.0.3.cpuApr13/cfgtoollogs/opatch/opatch2013-12-12_05-24-34AM_1.log
Invoking utility "disableonlinepatch"
Disabling and removing online patch 'bug8547978.pch', on database 'paige101'
OPatch succeeded.
If you try and disable in an instance that does not have the patch you get:
Invoking utility "disableonlinepatch"
UtilSession failed:
Patch ID: 8547978
The details are:
The specified online patch(es) are installed on the following Database Instances (SIDs)
"jamet101".
The SIDs given for rollback are not the same. OPatch cannot continue.
Rolled back (it is advised to disable in all but one instances before rollback) then rollback from that last one:
oracle@bdhn4914:SID=jamet101> $ORACLE_HOME/OPatch/opatch rollback -id 8547978 -connectString jamet101::
Oracle Interim Patch Installer version 11.2.0.3.0
Copyright (c) 2012, Oracle Corporation. All rights reserved.
Oracle Home : /opt/oracle/product/11.2.0.3.cpuApr13
Central Inventory : /opt/oracle/oraInventory
from : /opt/oracle/product/11.2.0.3.cpuApr13/oraInst.loc
OPatch version : 11.2.0.3.0
OUI version : 11.2.0.3.0
Log file location : /opt/oracle/product/11.2.0.3.cpuApr13/cfgtoollogs/opatch/8547978_Dec_12_2013_05_34_55/rollback2013-12-12_05-34-55AM_1.log
RollbackSession rolling back interim patch '8547978' from OH '/opt/oracle/product/11.2.0.3.cpuApr13'
The patch should be applied/rolled back in '-all_nodes' mode only.
Converting the RAC mode to '-all_nodes' mode.
Patching component oracle.rdbms, 11.2.0.3.0...
The patch will be removed from active database instances.
Disabling and removing online patch 'bug8547978.pch', on database 'jamet101'
RollbackSession removing interim patch '8547978' from inventory
Log file location: /opt/oracle/product/11.2.0.3.cpuApr13/cfgtoollogs/opatch/8547978_Dec_12_2013_05_34_55/rollback2013-12-12_05-34-55AM_1.log
OPatch succeeded.
Further reading: RDBMS Online Patching Aka Hot Patching (Doc ID 761111.1)
Patch can be applied to home once with a single instance, enabled by default but can then be disabled at a later date or backed out. Examples show using sys and pw : separated but leaving blank allows users with sysdba to apply. NOTE - It is strongly recommended to rollback all online patches and replace them with regular (offline) patches on next instance shutdown
oracle@bdhn4914:SID=jamet101> /opt/oracle/product/11.2.0.3.cpuApr12/OPatch/opatch apply online -connectString jamet101::
Oracle Interim Patch Installer version 11.2.0.3.0
Copyright (c) 2012, Oracle Corporation. All rights reserved.
Oracle Home : /opt/oracle/product/11.2.0.3.cpuApr13
Central Inventory : /opt/oracle/oraInventory
from : /opt/oracle/product/11.2.0.3.cpuApr13/oraInst.loc
OPatch version : 11.2.0.3.0
OUI version : 11.2.0.3.0
Log file location : /opt/oracle/product/11.2.0.3.cpuApr13/cfgtoollogs/opatch/8547978_Dec_12_2013_05_08_08/apply2013-12-12_05-08-08AM_1.log
The patch should be applied/rolled back in '-all_nodes' mode only.
Converting the RAC mode to '-all_nodes' mode.
Applying interim patch '8547978' to OH '/opt/oracle/product/11.2.0.3.cpuApr13'
Verifying environment and performing prerequisite checks...
All checks passed.
Backing up files...
Patching component oracle.rdbms, 11.2.0.3.0...
Installing and enabling the online patch 'bug8547978.pch', on database 'jamet101'.
Verifying the update...
Patch 8547978 successfully applied
Log file location: /opt/oracle/product/11.2.0.3.cpuApr13/cfgtoollogs/opatch/8547978_Dec_12_2013_05_08_08/apply2013-12-12_05-08-08AM_1.log
OPatch succeeded.
Can later be applied to other instances :
/opt/oracle/product/11.2.0.3.cpuApr12/OPatch/opatch util enableonlinepatch -connectString paige101:: -id 8547978
Oracle Interim Patch Installer version 11.2.0.3.0
Copyright (c) 2012, Oracle Corporation. All rights reserved.
Oracle Home : /opt/oracle/product/11.2.0.3.cpuApr13
Central Inventory : /opt/oracle/oraInventory
from : /opt/oracle/product/11.2.0.3.cpuApr13/oraInst.loc
OPatch version : 11.2.0.3.0
OUI version : 11.2.0.3.0
Log file location : /opt/oracle/product/11.2.0.3.cpuApr13/cfgtoollogs/opatch/opatch2013-12-12_05-20-55AM_1.log
Invoking utility "enableonlinepatch"
Installing and enabling the online patch 'bug8547978.pch', on database 'paige101'.
OPatch succeeded.
Disabled or removed:
oracle@bdhn4914:SID=jamet101> $ORACLE_HOME/OPatch/opatch util DisableOnlinePatch -connectString paige101:: -ph /var/opt/vgvd01/u01/oracle/tmp/8547978/online
Oracle Interim Patch Installer version 11.2.0.3.0
Copyright (c) 2012, Oracle Corporation. All rights reserved.
Oracle Home : /opt/oracle/product/11.2.0.3.cpuApr13
Central Inventory : /opt/oracle/oraInventory
from : /opt/oracle/product/11.2.0.3.cpuApr13/oraInst.loc
OPatch version : 11.2.0.3.0
OUI version : 11.2.0.3.0
Log file location : /opt/oracle/product/11.2.0.3.cpuApr13/cfgtoollogs/opatch/opatch2013-12-12_05-24-34AM_1.log
Invoking utility "disableonlinepatch"
Disabling and removing online patch 'bug8547978.pch', on database 'paige101'
OPatch succeeded.
If you try and disable in an instance that does not have the patch you get:
Invoking utility "disableonlinepatch"
UtilSession failed:
Patch ID: 8547978
The details are:
The specified online patch(es) are installed on the following Database Instances (SIDs)
"jamet101".
The SIDs given for rollback are not the same. OPatch cannot continue.
Rolled back (it is advised to disable in all but one instances before rollback) then rollback from that last one:
oracle@bdhn4914:SID=jamet101> $ORACLE_HOME/OPatch/opatch rollback -id 8547978 -connectString jamet101::
Oracle Interim Patch Installer version 11.2.0.3.0
Copyright (c) 2012, Oracle Corporation. All rights reserved.
Oracle Home : /opt/oracle/product/11.2.0.3.cpuApr13
Central Inventory : /opt/oracle/oraInventory
from : /opt/oracle/product/11.2.0.3.cpuApr13/oraInst.loc
OPatch version : 11.2.0.3.0
OUI version : 11.2.0.3.0
Log file location : /opt/oracle/product/11.2.0.3.cpuApr13/cfgtoollogs/opatch/8547978_Dec_12_2013_05_34_55/rollback2013-12-12_05-34-55AM_1.log
RollbackSession rolling back interim patch '8547978' from OH '/opt/oracle/product/11.2.0.3.cpuApr13'
The patch should be applied/rolled back in '-all_nodes' mode only.
Converting the RAC mode to '-all_nodes' mode.
Patching component oracle.rdbms, 11.2.0.3.0...
The patch will be removed from active database instances.
Disabling and removing online patch 'bug8547978.pch', on database 'jamet101'
RollbackSession removing interim patch '8547978' from inventory
Log file location: /opt/oracle/product/11.2.0.3.cpuApr13/cfgtoollogs/opatch/8547978_Dec_12_2013_05_34_55/rollback2013-12-12_05-34-55AM_1.log
OPatch succeeded.
Further reading: RDBMS Online Patching Aka Hot Patching (Doc ID 761111.1)