您好,登錄后才能下訂單哦!
這篇文章主要介紹oracle 11.2.0.4單實例打補丁的示例分析,文中介紹的非常詳細,具有一定的參考價值,感興趣的小伙伴們一定要看完!
0、如何獲取oracle 11g安裝包:
1)登陸SR(https://support.oracle.com),搜索13390677,按照平臺選擇對應的安裝包,比如rhel 64位選擇Linux x86-64
2)下載對應包:
p13390677_112040_Linux-x86-64_1of7.zip:oracle 服務器軟件安裝包
p13390677_112040_Linux-x86-64_2of7.zip:oracle 服務器軟件安裝包
p13390677_112040_Linux-x86-64_3of7.zip:grid 軟件安裝包
p13390677_112040_Linux-x86-64_4of7.zip:oracle 客戶端軟件安裝包
1、如何獲取oracle 11g補丁:
1)登陸SR,搜索1454618.1
2)選項解釋:
Oracle Database Base Releases:用于下載一些測試版本的oracle軟件,比如11.2.0.1,建議不適用這類版本,因為漏洞較多。
Oracle Database Patchsets:數據庫軟件安裝包(可以搜索到0步中的文件)
Oracle Database Release Updates(Versions 12.2 & higher):???????
Oracle Database Release Update Revisions(Versions 12.2 & higher):???????
Oracle Database PSU,SPU(CPU),Bundle Patches(Versions 12.1 & lower):常用的補丁包
OJVM RU/PSU/Bundle Patches:包含OJVM的補丁包
Lastest Available Microsoft Windows Patches:windows相關的
2、如何獲取opatch:
1)登陸SR,搜索文檔(274526.1)或者直接搜索opatch
2)選擇對應版本下載。
3、區別:
1)SPU(CPU):指的是CPU(Critical Patch Update)補丁。每季度發布一次(應該是隔段時間發布),用來修復安全方面的一些補丁,是累積型的。在2012年已更名為Security Patch Update(SPU)。主要指那些本來不屬于軟件錯誤,正常使用不會出錯的問題。但是別有用心的人可以特別手段繞過數據庫安全機制獲取非法權限。說白了就是一種安全補丁,為了防止黑客利用,攻擊數據庫。
2)PSU:指的是Patch Set Update,就是補丁集。Oracle選取在每個季度用戶下載數量最多,并且得到驗證具有較低風險的補丁放入每個季度的PSU中,修復一些比較嚴重的問題,也是累積型的。
值得注意的是,每個季度的PSU包含相應季度的SPU補丁。
3)BP:指的是Bundle Patch,也是補丁集,修復多個Bug,只不過是用于Windows平臺上的,也是累積型的。Oracle會周期性發布BP(至少每季度一次),而且每個BP會包含之前所有的BP,也就是說,只需要安裝最新的BP即可。另外,Oracle 的集群軟件和數據庫軟件的BP是同一個,也就是既可以打在集群上,也可以打在數據庫軟件上。
4)GI PSU:用于安裝在集群軟件的補丁集。針對Oracle Rac。
5)OJVM PSU:用于修復JAVA 虛擬機相關漏洞的補丁集。針對Rac,建議grid層面打一次,oracle層面也打一次。
綜上所示:
對于windows系統,只需要下載最新版本BP,在集群層面(若有)和數據庫層面各打一次布丁即可。
對于非windows系統,集群層面(若有)需要打最新版本OJVM + GI PSU ,數據庫層面需要打最新版本OJVM +DB PSU。
4、修復過程:
1)將opatch文件、單實例PSU上傳到服務器的/tmp目錄
2)查看當前補丁集:
[oracle@testlihb OPatch]$ cd $ORACLE_HOME/OPatch
[oracle@testlihb OPatch]$ ./opatch lsinv
Oracle Interim Patch Installer version 11.2.0.3.4
Copyright (c) 2012, Oracle Corporation. All rights reserved.
Oracle Home : /database/jkzx/product/11.2.0/db_1
Central Inventory : /database/jkzx/oraInventory
from : /database/jkzx/product/11.2.0/db_1/oraInst.loc
OPatch version : 11.2.0.3.4
OUI version : 11.2.0.4.0
Log file location : /database/jkzx/product/11.2.0/db_1/cfgtoollogs/opatch/opatch3018-04-02_15-22-15PM_1.log
Lsinventory Output file location : /database/jkzx/product/11.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2018-04-02_15-22-15PM.txt
--------------------------------------------------------------------------------
Installed Top-level Products (1):
Oracle Database 11g 11.2.0.4.0
There are 1 products installed in this Oracle Home.
There are no Interim patches installed in this Oracle Home.
--------------------------------------------------------------------------------
OPatch succeeded.
3)更換OPatch文件
[oracle@testlihb OPatch]$ cd $ORACLE_HOME
[oracle@testlihb db_1]$ mv /tmp/p6880880_112000_Linux-x86-64.zip .
[oracle@testlihb db_1]$ mv OPatch OPatch_bak
[oracle@testlihb db_1]$ unzip p6880880_112000_Linux-x86-64.zip
4)解壓PSU文件
[oracle@testlihb db_1]$ cd /tmp/
[oracle@testlihb tmp]$ unzip p27011017_112040_Linux-x86-64.zip
5)安裝PSU補丁集(必須先安裝PSU補丁集再安裝OJVM補丁集)
[oracle@testlihb tmp]$ cd 27011017/
[oracle@testlihb 27011017]$ ls
26925532 26925576 README.html README.txt
##關庫
[oracle@testlihb 27011017]$ sqlplus / as sysdba
SQL> shutdown immediate
SQL> exit
[oracle@testlihb 27011017]$ ps -ef|grep smon_
oracle 30411 30118 0 15:40 pts/0 00:00:00 grep smon_
##關監聽
[oracle@testlihb 27011017]$ ps -ef|grep lsn
oracle 24373 1 0 11:44 ? 00:00:00 /database/jkzx/product/11.2.0/db_1/bin/tnslsnr LISTENER -inherit
oracle 30413 30118 0 15:40 pts/0 00:00:00 grep lsn
[oracle@testlihb 27011017]$ lsnrctl stop
[oracle@testlihb 27011017]$ ps -ef|grep lsn
oracle 30415 30118 0 15:41 pts/0 00:00:00 grep lsn
##安裝前環境配置和檢查
[oracle@testlihb 27011017]$ cd 26925576
[oracle@testlihb 26925576]$ export PATH=$PATH:$ORACLE_HOME/OPatch:/usr/ccs/bin
[oracle@testlihb 26925576]$ opatch prereq CheckConflictAgainstOHWithDetail -ph ./
Prereq "checkConflictAgainstOHWithDetail" passed.
OPatch succeeded.
[oracle@testlihb 26925576]$ opatch apply
Do you want to proceed? [y|n]
y
Email address/User Name:
Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]: y
Is the local system ready for patching? [y|n]
y
Applying sub-patch '17478514' to OH '/database/jkxt/product/11.2.0/db_1'
Patching component oracle.rdbms, 11.2.0.4.0...
。。。
Applying sub-patch '26392168' to OH '/database/jkxt/product/11.2.0/db_1'
ApplySession: Optional component(s) [ oracle.oid.client, 11.2.0.4.0 ] not present in the Oracle Home or a higher version is found.
OPatch found the word "error" in the stderr of the make command.
Please look at this stderr. You can re-run this make command.
Stderr output:
chmod: changing permissions of `/database/jkxt/product/11.2.0/db_1/bin/extjobO': Operation not permitted
make: [iextjob] Error 1 (ignored)
Composite patch 26925576 successfully applied.
OPatch Session completed with warnings.
Log file location: /database/jkxt/product/11.2.0/db_1/cfgtoollogs/opatch/opatch3018-04-02_16-51-12PM_1.log
OPatch completed with warnings.
6)安裝PSU補丁集后的補充工作
[oracle@testlihb 26925576]$ cd $ORACLE_HOME/rdbms/admin
[oracle@testlihb admin]$ sqlplus / as sysdba
SQL> startup
SQL> @catbundle.sql psu apply
SQL> shutdown immediate
SQL> exit
7)安裝OJVM補丁集預檢查
[oracle@testlihb admin]$ cd /tmp/27011017/26925532
[oracle@testlihb 27011017]$ cd 26925532
[oracle@testlihb 26925532]$ export PATH=$PATH:/database/jkzx/product/11.2.0/db_1/OPatch
[oracle@testlihb 26925532]$ opatch prereq CheckConflictAgainstOHWithDetail -ph ./
。。。
Prereq "checkConflictAgainstOHWithDetail" passed.
OPatch succeeded.
8)安裝OJVM補丁集
[oracle@testlihb 26925532]$ opatch apply
。。。
OPatch continues with these patches: 26925532
Do you want to proceed? [y|n]
y
Email address/User Name:
Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]: y
Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...
Applying interim patch '26925532' to OH '/database/jkxt/product/11.2.0/db_1'
ApplySession: Optional component(s) [ oracle.sqlj, 11.2.0.4.0 ] , [ oracle.sqlj.companion, 11.2.0.4.0 ] not present in the Oracle Home or a higher version is found.
Patching component oracle.javavm.server, 11.2.0.4.0...
。。。
Patch 26925532 successfully applied.
Log file location: /database/jkxt/product/11.2.0/db_1/cfgtoollogs/opatch/opatch3018-04-02_17-10-13PM_1.log
OPatch succeeded.
9)安裝OJVM補丁集的后續工作
[oracle@testlihb 26925532]$ cd $ORACLE_HOME/sqlpatch/26925532
[oracle@testlihb 26925532]$ sqlplus / as sysdba
SQL> startup upgrade
SQL> @postinstall.sql
SQL> shutdown immediate
SQL> startup
SQL> @?/rdbms/admin/utlrp.sql
SQL> exit
[oracle@testlihb 26925532]$ lsnrctl start
[oracle@testlihb 26925532]$ lsnrctl status
10)檢查當前補丁集情況:
[oracle@testlihb 26925532]$ opatch lsinv
。。。
Installed Top-level Products (1):
Oracle Database 11g 11.2.0.4.0
There are 1 products installed in this Oracle Home.
Interim patches (2) :
Patch 26925532 : applied on Mon Apr 02 17:11:56 CST 2018
Unique Patch ID: 21750570
Patch description: "OJVM PATCH SET UPDATE 11.2.0.4.180116"
Created on 27 Nov 2017, 11:12:35 hrs PST8PDT
Bugs fixed:
18933818, 19176885, 17201047, 25067795, 14774730, 19153980, 21911849
。。。
Patch 26925576 : applied on Mon Apr 02 16:56:21 CST 2018
Unique Patch ID: 21773885
Patch description: "Database Patch Set Update : 11.2.0.4.180116 (26925576)"
Created on 5 Dec 2017, 05:23:24 hrs PST8PDT
Sub-patch 26392168; "Database Patch Set Update : 11.2.0.4.171017 (26392168)"
。。。
Sub-patch 17478514; "Database Patch Set Update : 11.2.0.4.1 (17478514)"
Bugs fixed:
21174504, 17184721, 21538558, 16091637, 18092127, 17381384, 15979965
。。。
--------------------------------------------------------------------------------
OPatch succeeded.
以上是“oracle 11.2.0.4單實例打補丁的示例分析”這篇文章的所有內容,感謝各位的閱讀!希望分享的內容對大家有幫助,更多相關知識,歡迎關注億速云行業資訊頻道!
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。