Oracle patch也即是Oracle補丁。Oracle補丁又包含好幾個種類,小的補丁簡直是難以數計,難免讓人眼花缭亂。盡管如此,Oracle patch還是有序可循的。而且Oracle提供的opatch工具非常方便的用於安裝oracle patch,以及查看當前系統已經安裝的patch。本文列出了patch的幾種類型,以及主要描述通過opatch工具查看當前數據庫的patch應用的情況。對於如何apply patch可參考Oracle官方文檔。
1、Oracle patch類型
Critical Patch Update (CPU)
Bundled patches (For Windows and Exadata only)
PSR(Patch Set Release)/Patch Set Update(PSU)
? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 Oracle 為我們提供了用於patch安裝、回退、管理與追蹤的工具opatch,該工具為命令行工具,簡單易用,可以根據opatch的幫助命令來獲取幫助信息 #獲得opatch的幫助信息 [oracle@linux1 OPatch]$ ./opatch -help Invoking OPatch 11.1.0.6.6 #opatch的版本 Oracle Interim Patch Installer version 11.1.0.6.6 Copyright (c) 2009, Oracle Corporation. All rights reserved. Usage: opatch [ -help ] [ -r[eport] ] [ command ] command := apply #安裝patch lsinventory #查看所有已安裝的patch napply #用於Apply a set of patches at a time nrollback #用於Rollback a set of patches at a time rollback #Rollback an existing one-off patch indicated by the reference-id query version prereq #用於檢查安裝patch之前的先決條件 util <global_arguments> := -help Displays the help message for the command. -report Print the actions without executing. example: #可以通過下面的方式來查看每一個具體命令的用法 'opatch -help' 'opatch apply -help' 'opatch lsinventory -help' 'opatch napply -help' 'opatch nrollback -help' 'opatch rollback -help' 'opatch prereq -help' 'opatch util -help' OPatch succeeded. #下面查看oracle 10g下的補丁信息,對於如何安裝補丁,本文不作演示 oracle@M10DB01p:/users/oracle/OraHome10g/OPatch> ./opatch lsinventory Invoking OPatch 10.2.0.3.0 ......... Oracle Home : /users/oracle/OraHome10g Central Inventory : /users/oracle/oraInventory from : /etc/oraInst.loc OPatch version : 10.2.0.3.0 OUI version : 10.2.0.3.0 OUI location : /users/oracle/OraHome10g/oui Log file location : /users/oracle/OraHome10g/cfgtoollogs/opatch/opatch2013-12-19_09-54-27AM.log