溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶服務(wù)條款》

oracle 11.2.0.4單實(shí)例打補(bǔ)丁的示例分析

發(fā)布時(shí)間:2022-01-14 14:35:14 來(lái)源:億速云 閱讀:205 作者:小新 欄目:關(guān)系型數(shù)據(jù)庫(kù)

這篇文章主要介紹oracle 11.2.0.4單實(shí)例打補(bǔ)丁的示例分析,文中介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們一定要看完!

0、如何獲取oracle 11g安裝包:
    1)登陸SR(https://support.oracle.com),搜索13390677,按照平臺(tái)選擇對(duì)應(yīng)的安裝包,比如rhel 64位選擇Linux x86-64
    2)下載對(duì)應(yīng)包:
        p13390677_112040_Linux-x86-64_1of7.zip:oracle 服務(wù)器軟件安裝包
        p13390677_112040_Linux-x86-64_2of7.zip:oracle 服務(wù)器軟件安裝包
        p13390677_112040_Linux-x86-64_3of7.zip:grid 軟件安裝包
        p13390677_112040_Linux-x86-64_4of7.zip:oracle 客戶端軟件安裝包
1、如何獲取oracle  11g補(bǔ)丁:
    1)登陸SR,搜索1454618.1
    2)選項(xiàng)解釋?zhuān)?br/>        Oracle Database Base Releases:用于下載一些測(cè)試版本的oracle軟件,比如11.2.0.1,建議不適用這類(lèi)版本,因?yàn)槁┒摧^多。
        Oracle Database Patchsets:數(shù)據(jù)庫(kù)軟件安裝包(可以搜索到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):常用的補(bǔ)丁包
        OJVM RU/PSU/Bundle Patches:包含OJVM的補(bǔ)丁包
        Lastest Available Microsoft Windows Patches:windows相關(guān)的
2、如何獲取opatch:
    1)登陸SR,搜索文檔(274526.1)或者直接搜索opatch
    2)選擇對(duì)應(yīng)版本下載。
3、區(qū)別:
    1)SPU(CPU):指的是CPU(Critical Patch Update)補(bǔ)丁。每季度發(fā)布一次(應(yīng)該是隔段時(shí)間發(fā)布),用來(lái)修復(fù)安全方面的一些補(bǔ)丁,是累積型的。在2012年已更名為Security Patch Update(SPU)。主要指那些本來(lái)不屬于軟件錯(cuò)誤,正常使用不會(huì)出錯(cuò)的問(wèn)題。但是別有用心的人可以特別手段繞過(guò)數(shù)據(jù)庫(kù)安全機(jī)制獲取非法權(quán)限。說(shuō)白了就是一種安全補(bǔ)丁,為了防止黑客利用,攻擊數(shù)據(jù)庫(kù)。
    2)PSU:指的是Patch Set Update,就是補(bǔ)丁集。Oracle選取在每個(gè)季度用戶下載數(shù)量最多,并且得到驗(yàn)證具有較低風(fēng)險(xiǎn)的補(bǔ)丁放入每個(gè)季度的PSU中,修復(fù)一些比較嚴(yán)重的問(wèn)題,也是累積型的。
    值得注意的是,每個(gè)季度的PSU包含相應(yīng)季度的SPU補(bǔ)丁。
    3)BP:指的是Bundle Patch,也是補(bǔ)丁集,修復(fù)多個(gè)Bug,只不過(guò)是用于Windows平臺(tái)上的,也是累積型的。Oracle會(huì)周期性發(fā)布BP(至少每季度一次),而且每個(gè)BP會(huì)包含之前所有的BP,也就是說(shuō),只需要安裝最新的BP即可。另外,Oracle 的集群軟件和數(shù)據(jù)庫(kù)軟件的BP是同一個(gè),也就是既可以打在集群上,也可以打在數(shù)據(jù)庫(kù)軟件上。
    4)GI PSU:用于安裝在集群軟件的補(bǔ)丁集。針對(duì)Oracle Rac。
    5)OJVM PSU:用于修復(fù)JAVA 虛擬機(jī)相關(guān)漏洞的補(bǔ)丁集。針對(duì)Rac,建議grid層面打一次,oracle層面也打一次。
    
    綜上所示:
    對(duì)于windows系統(tǒng),只需要下載最新版本BP,在集群層面(若有)和數(shù)據(jù)庫(kù)層面各打一次布丁即可。
    對(duì)于非windows系統(tǒng),集群層面(若有)需要打最新版本OJVM + GI PSU ,數(shù)據(jù)庫(kù)層面需要打最新版本OJVM +DB PSU。
4、修復(fù)過(guò)程:
    1)將opatch文件、單實(shí)例PSU上傳到服務(wù)器的/tmp目錄
    2)查看當(dāng)前補(bǔ)丁集:
        [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補(bǔ)丁集(必須先安裝PSU補(bǔ)丁集再安裝OJVM補(bǔ)丁集)
        [oracle@testlihb tmp]$ cd 27011017/
        [oracle@testlihb 27011017]$ ls
        26925532  26925576  README.html  README.txt
        ##關(guān)庫(kù)
        [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_
        ##關(guān)監(jiān)聽(tīng)
        [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
        ##安裝前環(huán)境配置和檢查
        [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補(bǔ)丁集后的補(bǔ)充工作
            [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補(bǔ)丁集預(yù)檢查
            [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補(bǔ)丁集
            [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補(bǔ)丁集的后續(xù)工作
            [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)檢查當(dāng)前補(bǔ)丁集情況:
            [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單實(shí)例打補(bǔ)丁的示例分析”這篇文章的所有內(nèi)容,感謝各位的閱讀!希望分享的內(nèi)容對(duì)大家有幫助,更多相關(guān)知識(shí),歡迎關(guān)注億速云行業(yè)資訊頻道!

向AI問(wèn)一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI