Opatch: Enable/disable the one off oracle patch to all of the databases using opatch util
Problem:
========
Consider this situation,
1) You have Shared Oracle Home
2) 2 Databases running
3) You need to apply a patch for one databases only
Many of us know once we apply the patch to a home this new patch will be used by Databases attached to that Oracle Home,
But you may consider this situation.
1) Not all the patches are enabled by default, you have to manually enable it (I believe from 10g onwards)
2) Though its enabled, Out of your 2 databases you may just required only for 1 database, so you need to disable the patch or you may required to enable the patch
Back to solution:-
=================
According to Metalink note:- RDBMS Online Patching Aka Hot Patching [ID 761111.1]
1) Assuming you have applied the patch 9877980
2) Verification for database 1 :-
SQL> Show parameter database_name
db_name value
========================
db_name TEST1SQL> oradebug patch list
Patch File Name State
================ =========
bug9877980.pch ENABLED3) Verification for database 2 :-
SQL> Show parameter database_name
db_name value
========================
db_name TEST1SQL> oradebug patch list
Patch File Name State
================ =========
bug9877980.pch ENABLED
4) Now I do not want the patch 9877980 to be enabled in TEST2 database.
opatch util disableonlinepatch -connectString TEST2:sys:oracle123:hostname -ph /home/oracle/9877980/online
5) Suppose after some time I want to enable the patch again back to TEST2 database.
opatch util enableonlinepatch -connectString TEST2:sys:oracle123:hostname -id 9877980
Another option to enable or disable the patches for given SID ,
Here: - http://db.geeksinsight.com/2012/10/04/switching-onoff-bug-fixes-patches/
Follow Me!!!