久久精品人人爽,华人av在线,亚洲性视频网站,欧美专区一二三

oracle 11.2.0.4單實例打補丁的示例分析

142次閱讀
沒有評論

共計 8093 個字符,預計需要花費 21 分鐘才能閱讀完成。

這篇文章主要介紹 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 單實例打補丁的示例分析”這篇文章的所有內容,感謝各位的閱讀!希望分享的內容對大家有幫助,更多相關知識,歡迎關注丸趣 TV 行業資訊頻道!

正文完
 
丸趣
版權聲明:本站原創文章,由 丸趣 2023-07-15發表,共計8093字。
轉載說明:除特殊說明外本站除技術相關以外文章皆由網絡搜集發布,轉載請注明出處。
評論(沒有評論)
主站蜘蛛池模板: 岳池县| 绍兴县| 弥勒县| 亳州市| 车致| 于都县| 勃利县| 白河县| 乳山市| 吉林省| 江油市| 江都市| 万宁市| 英山县| 曲周县| 波密县| 溧水县| 广州市| 青河县| 阳信县| 得荣县| 旬阳县| 温宿县| 顺平县| 浑源县| 榆树市| 邢台县| 静乐县| 正镶白旗| 星子县| 勃利县| 涿州市| 新龙县| 仁怀市| 永善县| 六安市| 汉沽区| 贵阳市| 德安县| 泸定县| 承德市|