| 類型 | 全稱 | 特點 | 適用對象 |
|---|---|---|---|
| CPU | Critical Patch Update | 季度安全修補,僅含安全修復,風險最低 | 所有平台 |
| PSU | Patch Set Update | 季度累積修補,含 CPU + 功能性 Bug 修復,測試更充分 | 所有平台 |
| Bundle Patch | Windows/Exadata 專用 | 針對特定平台的累積包,包含驅動、韌體等 | Windows、Exadata |
| PSR | Patch Set Release | 大版本升級 (如 10.2.0.3 → 10.2.0.4),功能變更多 | 所有平台 |
| One-off / Interim | 單一 Bug 修補 | 針對特定 Bug,需 SR 請求,風險較高 | 特定客戶 |
建議生產環境優先套用 PSU,安全與穩衡兼顧;CPU 僅修安全漏洞,功能 Bug 不修。
# 查看已安裝 Patch 清單 (含 Bug 編號)
opatch lsinventory
# 詳細模式:顯示異動檔案、節點資訊
opatch lsinventory -detail
# 僅列出已修復 Bug 編號與描述
opatch lsinventory -bugs_fixed
# 安裝單一 Patch
opatch apply /path/to/patch_dir
# 安裝多個 Patch (自動處理相依)
opatch napply /path/to/patches_dir
# 移除單一 Patch
opatch rollback -id
# 移除多個 Patch
opatch nrollback -id
# 安裝前先決條件檢查
opatch prereq CheckConflictAgainstOHWithDetail -ph /path/to/patch
# 查看 OPatch 版本
opatch version
Installed Top-level Products (2):
Oracle Database 10g 10.2.0.1.0 # 基礎版本
Oracle Database 10g Release 2 Patch Set 2 10.2.0.3.0 # PSR
Interim patches (2):
Patch 5556081 : applied on Wed Feb 15 2012 Bugs fixed: 5556081
Patch 5557962 : applied on Wed Feb 15 2012 Bugs fixed: 4269423,5557962,5528974
Installed Top-level Products (1):
Oracle Database 11g 11.2.0.1.0
Installed Products (134): ... # 組件清單
Interim patches (1):
Patch 8670579 : applied on Thu Aug 15 2013
Bugs fixed: 8670579
Files Touched:
/ahseteco.o -> ORACLE_HOME/lib/libnnz11.a
libnnz11.so -> ORACLE_HOME/lib/libnnz11.so
Patch Location in Inventory: /u01/app/oracle/db_1/inventory/oneoffs/8670579
Rac system: Local node=linux1, Remote node=linux2
SELECT comp_name, version FROM dba_server_registry;
可快速確認各元件 (XML DB, Java VM, Text 等) 版本是否一致。
opatch lsinventory -bugs_fixed 輸出備份。opatch prereq,確認無衝突再上生產。$ORACLE_HOME/.patch_storage 與 Inventory 備份,支援快速回滾。