一、相關知識介紹
以前只知道有CPU(Critical Patch Update)和PSU(Patch Set Update),不知道還有個Bundle Patch,由于出現了TNS-12531的BUG問題,需要在windows上打至少為Patch bundle?22補丁。通過學習查找:
Oracle里的補丁具體分為如下這樣6種類型:
Oracle Interim patches: A patch that is applied inbetween patchset releases with the Opatch utility. Interim patches aresometimes also referred to as patchset exceptions.
Oracle Merge patches: A type of interim patch thatmerges multiple fixes to ensure that one fix doesn't overwrite the other. Mergepatches are typically required when a conflict is detected between an existingpatch and a new patch.
Oracle Bundle patches: A type of interim patch that contains fixes to manyimportant bugs, though not as many as a patchset.
Oracle Critical Patch Update (CPU) patches: A typeof interim patch that contains fixes to critical security bugs delivered on aquarterly basis.
Patch Set Updates(PSUs): PSUs are proactivecumulative patches containing recommended bug fixes that are released on aregular and predictable schedule. PSUs are on the same quarterly schedule asthe Critical Patch Updates (CPU), specifically the Tuesday closest to the 15thof January, April, July, and October.
Oracle Patchsets: Software-release mechanisms fordelivering tested and integrated product fixes on a regular basis.
有人認為它只存在于windows系統上,其實在UNIX操作系統上也用該種類型的補丁。之所以這么劃分是有其原因的,在Windows系統上,DLL’s(Dynamic Linked Libraries)和庫中的可執行文件,不同于其他系統上的庫文件,例如,UNIX上的為“.o”結尾的庫文件,兩者工作原理不同,
當用戶在Windows執行補丁修復的時候,在ORACLE HOME中的Oracle的可執行文件將會被補丁中的可執行文件代替。這個行為的結果是,老的補丁將會丟失,所以Windows上不能執行一些個體BUG的修訂,代替之的是,許多補丁會組成一起成為一個“Bundle Patch”。
所有的在Windows上的BundlePatch都是一個積累的,它意味著先前的安全告警修復和Bundle Patches都會被包括。
ORACLEDatabase(11.2.0.3.0)的所有的補丁信息都將在11.2.0.3 Patch Set - Availability and Known Issues [ID1348336.1]找到。
在文檔ID 161549.1中找到了補丁16803774為最新的Bundle Patch。
二、大致步驟
由于本次做的補丁僅在單機的WINDOWS X64上做,如下步驟:
1、? 確保perl的可執行路徑在加載到PATH中
set PATH=%ORACLE_HOME%\perl\bin;%PATH%
2、? 關閉數據庫,確保所有關于oracle的進程都將被關閉。
3、? 設置ORACLE_HOME環境變量
SET?ORACLE_HOME=
4、進入到下載的路徑
> cd? 16803775
5、確保OPatch的執行腳本在你的PATH設置中,執行補丁應用:
>opatch? apply
6、如果出現錯誤,檢查%ORACLE_HOME%\cfgtoollogs\opatch 下的補丁日志信息。
7、檢查補丁應用的情況,最后不要忘記關注隨Patch附帶的Known ?Issues。
三、操作實錄
C:\Users\Administrator>d:
D:\>set PATH=%path%;D:\app\Administrator\product\11.2.0\dbhome_1\perl\bin
D:\>set PATH=%path%;D:\app\Administrator\product\11.2.0\dbhome_1\OPatch
D:\>opatch lsinv
The Oracle Home D:\ is not OUI basedhome.Please give proper Oracle Home.
OPatch returns with error code = 1
OPatch succeeded.
D:\>set ORACLE_HOME=D:\app\Administrator\product\11.2.0\dbhome_1\
--執行沒有成功,設置正確的ORALCE_HOME后:
D:\>opatch lsinv
Invoking OPatch 11.2.0.1.7
Oracle 中間補丁程序安裝程序版本11.2.0.1.7
版權所有 (c) 2011, Oracle Corporation。保留所有權利。
Oracle Home?????? :D:\app\Administrator\product\11.2.0\dbhome_1
Central Inventory : C:\ProgramFiles\Oracle\Inventory
from?????????? : n/a
OPatch version??? : 11.2.0.1.7
OUI version?????? : 11.2.0.3.0
Log file location :D:\app\Administrator\product\11.2.0\dbhome_1\cfgtoollogs\opa
tch\opatch2013-07-17_09-48-20上午.log
Lsinventory Output file location :D:\app\Administrator\product\11.2.0\dbhome_1\
cfgtoollogs\opatch\lsinv\lsinventory2013-07-17_09-48-20上午.txt
--------------------------------------------------------------------------------
已安裝的頂級產品 (1):
Oracle Database 11g???????????? ?????????????????????????????????????11.2.0.3.0
此 Oracle 主目錄中已安裝 1 個產品。
此 Oracle 主目錄中未安裝任何中間補丁程序。
--------------------------------------------------------------------------------
OPatch succeeded.
--我們可以看到11.2.0.3的初始化的OPatch為11.2.0.1.7,文檔中要求OPatch utility release 11.2.0.1.9 or later.下載6880880OPatch 工具。
OPatch相關操作可以在http://blog.csdn.net/jyjxs/article/details/8983880中找到
--可以看到目錄中沒有應用Patch,進入到下載目錄中
D:\>cd D:\p16803775_112030_MSWIN-x86-64\16803775
D:\p16803775_112030_MSWIN-x86-64\16803775>opatch ?apply
Oracle 中間補丁程序安裝程序版本11.2.0.3.4
版權所有 (c) 2012, Oracle Corporation。保留所有權利。
Oracle Home?????? :D:\app\Administrator\product\11.2.0\dbhome_1
Central Inventory : C:\ProgramFiles\Oracle\Inventory
from?????????? : n/a
OPatch version??? : 11.2.0.3.4
OUI version?????? : 11.2.0.3.0
Log file location :D:\app\Administrator\product\11.2.0\dbhome_1\cfgtoollogs\opa
tch\16803775_Jul_17_2013_11_15_45\apply2013-07-17_11-15-45上午_1.log
Applying interim patch '16803775' to OH'D:\app\Administrator\product\11.2.0\dbh
ome_1'
Verifying environment and performingprerequisite checks...
Patch 16803775: Optional component(s)missing : [ oracle.precomp.lang, 11.2.0.3.
0 ] , [ oracle.rdbms.tg4msql, 11.2.0.3.0 ], [ oracle.rdbms.ic, 11.2.0.3.0 ] , [
oracle.has.cvu, 11.2.0.3.0 ] , [oracle.has.crs, 11.2.0.3.0 ] , [ oracle.usm, 1
1.2.0.3.0 ] , [ oracle.rdbms.tg4db2,11.2.0.3.0 ] , [ oracle.rdbms.tg4ifmx, 11.2
.0.3.0 ] , [ oracle.rdbms.tg4sybs,11.2.0.3.0 ] , [ oracle.rdbms.tg4tera, 11.2.0
.3.0 ] , [ oracle.rdbms.scheduler,11.2.0.3.0 ]
All checks passed.
提供電子郵件地址以用于接收有關安全問題的通知, 安裝 Oracle Configuration Manager
并啟動它。如果您使用 My Oracle
Support 電子郵件地址/用戶名, 操作將更簡單。
有關詳細信息, 請訪問 http://www.oracle.com/support/policies.html。
電子郵件地址/用戶名:
尚未提供電子郵件地址以接收有關安全問題的通知。
是否不希望收到有關安全問題 (是 [Y], 否 [N]) [N] 的通知:? Y
請關閉本地系統上在此 ORACLE_HOME 之外運行的 Oracle 實例。
(Oracle 主目錄 ='D:\app\Administrator\product\11.2.0\dbhome_1')
本地系統是否已準備打補丁? [y|n]
Y
User Responded with: Y
Backing up files...
正在為組件 oracle.rdbms, 11.2.0.3.0 打補丁...
正在為組件 oracle.rdbms.rsf, 11.2.0.3.0 打補丁...
正在為組件 oracle.rdbms.plsql, 11.2.0.3.0 打補丁...
正在為組件 oracle.network.rsf, 11.2.0.3.0 打補丁...
正在為組件 oracle.precomp.common, 11.2.0.3.0 打補丁...
正在為組件 oracle.rdbms.rman, 11.2.0.3.0 打補丁...
正在為組件 oracle.rdbms.util, 11.2.0.3.0 打補丁...
正在為組件 oracle.ntoledb.odp_net_2, 11.2.0.3.0 打補丁...
正在為組件 oracle.rdbms.dbscripts, 11.2.0.3.0 打補丁...
正在為組件 oracle.xdk.rsf, 11.2.0.3.0 打補丁...
正在為組件 oracle.rdbms.rsf.ic, 11.2.0.3.0 打補丁...
正在為組件 oracle.rdbms.oci, 11.2.0.3.0 打補丁...
正在為組件 oracle.ntoramts, 11.2.0.3.0 打補丁...
正在為組件 oracle.ntoledb, 11.2.0.3.0 打補丁...
正在為組件 oracle.ctx, 11.2.0.3.0 打補丁...
正在為組件 oracle.odbc.ic, 11.2.0.3.0 打補丁...
正在為組件 oracle.has.common.cvu, 11.2.0.3.0 打補丁...
正在為組件 oracle.xdk, 11.2.0.3.0 打補丁...
Verifying the update...
Patch 16803775 successfully applied
Log file location:D:\app\Administrator\product\11.2.0\dbhome_1\cfgtoollogs\opat
ch\16803775_Jul_17_2013_11_15_45\apply2013-07-17_11-15-45上午_1.log
OPatch succeeded.
-- 檢查更新后的數據庫補丁狀況,可以看到是11.2.0.3.4的,說明patch bundle?22 屬于11.2.0.3.4的范圍呢
D:\p16803775_112030_MSWIN-x86-64\16803775>opatch ?lsinv
Oracle 中間補丁程序安裝程序版本11.2.0.3.4
版權所有 (c) 2012, Oracle Corporation。保留所有權利。
Oracle Home?????? :D:\app\Administrator\product\11.2.0\dbhome_1
Central Inventory : C:\ProgramFiles\Oracle\Inventory
from?????????? : n/a
OPatch version??? : 11.2.0.3.4
OUI version?????? : 11.2.0.3.0
Log file location :D:\app\Administrator\product\11.2.0\dbhome_1\cfgtoollogs\opa
tch\opatch2013-07-17_11-25-57上午_1.log
Lsinventory Output file location :D:\app\Administrator\product\11.2.0\dbhome_1\
cfgtoollogs\opatch\lsinv\lsinventory2013-07-17_11-25-57上午.txt
--------------------------------------------------------------------------------
已安裝的頂級產品 (1):
Oracle Database 11g????????????????????????????? ????????????????????11.2.0.3.0
此 Oracle 主目錄中已安裝 1 個產品。
中間補丁程序 (1) :
Patch?16803775???? : applied on Wed Jul17 11:18:00 CST 2013
Unique Patch ID:? 16524503
Patch description:? "ORACLE 11G 11.2.0.3 PATCH 22 BUG FORWINDOWS (64-BIT AMD64
AND INTEL EM64)"
Created on 01 Jul 2013, 00:06:51 hrs PST8PDT
Bugs fixed:
16803775, 16694777, 14467061, 16530565, 14571027, 14512189, 14053457
13857111, 13855490, 13814739, 13724193, 13493847, 12925089, 12912137
12755116, 12395918, 7509451, 12940637, 16747736, 14302813, 14273397
14459552, 16703112, 16306019, 16014985, 15905421, 13561750, 13791364
13015379, 6690853 , 16382448, 13774324, 16279401, 16279211, 16555186
16436434, 16077216, 15978267, 15934834, 15920201, 15911134, 15856610
14639430,13936066, 13912274, 15998768, 13899736, 14010695, 16803769
13639436, 14153464, 11866181, 16571785, 16777700, 10255235, 16092378
16594543, 12621588, 16221484, 16356444, 13492916, 13774313, 13651346
12977562, 13794550, 13569591, 14653968, 14393728, 14692460, 15947884
13499412, 15866631, 15867962, 11769185, 16519867, 16195231, 14123213
13625770, 13880758, 15889476, 13583663, 16774393, 12957306, 16223585
12621554, 12325243, 16002686, 13555551, 13789869, 13529386, 13599731
13446912, 16590638, 16245251, 12596686, 16198581, 14781609, 16694441
14000767, 16596183, 16339328, 16220192, 9864697, 16465101, 16578706
16656151, 14383007, 10131881, 14146298, 14222403, 14182835, 16458105
14107333, 16061956, 14657740, 13454409, 13809288, 13596581, 13850256
12951696, 16023490, 16455998, 9073910, 16212012, 16301888, 16009158
14489591, 13376140, 15857552, 14223541, 14781524, 16235055, 16178854
14355991, 12731763, 14309223, 14158012, 16219072, 16345834, 16368108
16382353, 10242202, 11715084, 13098318, 13496884, 13680405, 13812031
13914613, 14472647, 16175381, 16231699, 16299830, 15880538, 16368002
16268983, 12770551, 16100861, 15883525, 16270093, 14240074, 13931044
9185970, 14340896, 15936160, 16032010, 16206122, 15967792, 16026049
15956068, 15873502, 14589685, 13834436, 16059292, 13481404, 14630325
16042670, 13035320, 16272008, 14147762, 12974860, 12780510, 12824731
13924311, 14710852, 13559697, 14220725, 14841812, 14841558, 13596521
13561951, 13838047, 13943175, 14268365, 14535011, 12704789, 12870400
13011182, 13256955, 13694885, 13745317, 13924910, 13955385, 14048512
13791443, 12879027, 13584130, 13495307, 12594032, 13709220, 13247965
13243072, 13683125, 13652493, 12957127, 10215977, 13014128, 13040331
12857222, 12977501, 12664456, 12405931, 13525554, 13492863, 13573521
13873471, 13366268, 13352423, 13460353, 12709476, 13652088, 13886023
13942723, 12919564, 12894807, 12829021, 12612118, 11063191, 13503598
13482688, 13354082, 13484963, 13395403, 13542159, 12983611, 13718476
12846562, 9659614, 13326736, 11846902, 11665727, 13257247, 13588248
13544396, 13566938, 13615517, 13425727, 13037709, 12730342, 12349553
13502441, 13258062, 13251796, 13247273, 12659561, 12639013, 12594616
11772838, 13570057, 12403721, 12585543, 12784549, 12834800, 12975771
13040171, 13058950, 13063120, 13077335, 13365700, 13382280, 13384397
13440516, 13454210, 13457537, 13477790, 13496250, 13501787, 13505390
13506110, 13524899, 13572659, 13594712, 13617627, 13326289, 13555974
13035360, 13420224, 13419660, 13036331, 13332439, 13420174, 12583826
13358781, 11883969, 13524237, 12867713, 13328193, 13516727, 11865420
13502183, 13259364, 13371153, 12998795, 13413168, 12897902, 13044108
12971242, 12834027, 12620823, 13420516, 12849377, 12975811, 12646784
12829429, 12538907, 12950823, 12848480, 12823838, 13366202, 13002015
12834777, 13001901, 13017428, 13082238, 12965049, 11840910, 12656535
12617123, 13073340, 12925041, 12938841, 13023632, 13066371, 12942119
11877623, 12810890, 12995950, 12765467, 12934171, 13070939, 12535346
12985184, 13103913, 12765868, 12622441, 12876314, 12820045, 13038806
13090686, 12923168, 13362079, 12591252, 12718090, 12873909, 10350832
12795861, 13039908, 12976590, 13017584, 12627504, 13263435, 12847466
12797765, 12758736, 12878750, 12861463, 13024624, 12764337, 12662040
13068077, 12914824, 13074261, 12668341, 12597906, 12932852, 13045518
12897651, 12960925, 12728585, 13019958, 12902661, 12886827, 12913474
3522216, 12678920, 12885323, 13334158, 12947871, 12896850, 13001955
12784559, 12827166, 9703627, 12772345, 12905058, 13345868, 10357727
12827493, 13004894, 12780983, 12842804, 13146719, 12655301, 12960302
13085732, 12979199, 12638117, 13357509, 12401111, 12857064, 8631856
13035804, 13355963, 12845115, 12695029, 12990582, 12971775, 12867511
12917230, 12582664, 12849688, 12950644, 12588744, 13011520, 12899169,12823
042
--------------------------------------------------------------------------------
OPatch succeeded.
D:\p16803775_112030_MSWIN-x86-64\16803775>opatchls ?patches
16803775;ORACLE 11G 11.2.0.3 PATCH 22 BUG FOR WINDOWS (64-BIT AMD64 AND INTEL EM
64)