oracle 11.2.0.4单实例打补丁的示例分析

网友投稿 715 2023-12-01 11:44:04

oracle 11.2.0.4单实例打补丁的示例分析

这篇文章主要介绍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单实例打补丁的示例分析”这篇文章的所有内容,感谢各位的阅读!希望分享的内容对大家有帮助,更多相关知识,欢迎关注行业资讯频道!

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:MySQL如何部署在Linux上
下一篇:python中如何使用Redis存储好友关系
相关文章