11.2.0.4 RAC,手动方式安装PSU补丁

news/2024/9/19 15:38:04/文章来源:https://www.cnblogs.com/missyou-shiyh/p/18415581

1、前言

注意:Oracle不建议客户使用手动方式进行补丁安装,客户应该使用opatch auto方式进行补丁安装工作。但是,在opatch auto的过程中如果出现问题,我们可以将本文档中的步骤作为临时解决方法。

 

2、故障描述

客户有一套Exadata环境下的11.2.0.4 RAC,近期进行安全扫描时,提示一些数据库和OJVM安全漏洞,于是计划针对该环境安装11.2.0.4的最后一个BP补丁。补丁安装的方式也非常简单,主要就是执行opatch auto命令,结果对第一个节点执行opatch auto命令后,最终提示有几个补丁安装成功,而GRID_HOME有一个小补丁安装失败。错误日志如下。

Following active files are used by ORACLE_HOME: /u01/app/11.2.0.4/grid

/u01/app/11.2.0.4/grid/lib/libclntsh.so.11.1

UtilSession failed: Prerequisite check "CheckActiveFilesAndExecutables" failed...

 

3、故障处理

3.1 从错误日志可以看出,grid集群下的libclntsh.so.11.1文件被占用,导致GRID_HOME有一个小补丁安装失败。使用fuser命令查看哪些进程占用该文件。

# fuser /u01/app/11.2.0.4/grid/lib/libclntsh.so.11.1

/u01/app/11.2.0.4/grid/lib/libclntsh.so.11.1:  71475m

从fuser命令输出可以看出,的确有进程占用该文件。查看了下当前打开的所有secureCRT窗口,发现有个窗口正在执行asmcmd命令,很可能就是这个asmcmd命令未退出,导致libclntsh.so.11.1被锁。

3.2 虽然知道了故障的原因,但现在遇到了新的问题,那就是该节点由于只安装成功了一部分补丁,最终导致该节点无法正常启动。 重新执行crsctl stop crs -f, crsctl start crs, 但仍然无法启动集群。这很可能是由于补丁未成功安装导致的。

3.3 此时,手动方式安装补丁的办法派上了用场。在集群未能正常启动的情况下,将刚才报错的补丁进行手动安装。

Steps for Applying the Patch


Note:

You must stop the EM agent processes running from the database home, prior to patching the Oracle RAC database or GI Home. Execute the following command on the node to be patched.

As the Oracle RAC database home owner execute:

$ <ORACLE_HOME>/bin/emctl stop dbconsole

Execute the following on each node of the cluster in non-shared CRS and DB home environment to apply the patch.

  1. Stop the CRS managed resources running from DB homes.

    If this is a GI Home environment, as the database home owner execute:

    $ <ORACLE_HOME>/bin/srvctl stop home -o <ORACLE_HOME> -s <status file location> -n <node name>
    

    If this is an Oracle Restart Home environment, as the database home owner execute:

    $ <ORACLE_HOME>/bin/srvctl stop home -o <ORACLE_HOME> -s <status file location>
    

    Note:

    You need to make sure that the Oracle ACFS file systems are unmounted (see My Oracle Support document 1494652.1 How to Mount or Unmount ACFS File System While Applying GI Patches?) and all other Oracle processes are shutdown before you proceed.
  2. Run the pre root script.

    If this is a GI Home, as the root user execute:

    # <GI_HOME>/crs/install/rootcrs.pl -unlock
    

    If this is an Oracle Restart Home, as the root user execute:

    # <GI_HOME>/crs/install/roothas.pl -unlock
    
  3. Apply the CRS patch using

    As the GI home owner execute:

    $ <GI_HOME>/OPatch/opatch napply -oh <GI_HOME> -local <UNZIPPED_PATCH_LOCATION>/<GI_PSU_number>/<OCW Components_number>
    

    As the GI home owner execute:

    $ <GI_HOME>/OPatch/opatch napply -oh <GI_HOME> -local <UNZIPPED_PATCH_LOCATION>/<GI_PSU_number>/<ACFS Components_number>
    

    As the GI home owner execute:

    $ <GI_HOME>/OPatch/opatch apply -oh <GI_HOME> -local <UNZIPPED_PATCH_LOCATION>/<GI_PSU_number>/<DB_PSU_number>
    
  4. Run the pre script for DB component of the patch.

    As the database home owner execute:

    $ <UNZIPPED_PATCH_LOCATION>/<GI_PSU_number>/<OCW Components_number>/custom/server/<OCW Components_number>/custom/scripts/prepatch.sh -dbhome <ORACLE_HOME>
    
  5. Apply the DB patch.

    As the database home owner execute:

    $ <ORACLE_HOME>/OPatch/opatch napply -oh <ORACLE_HOME> -local <UNZIPPED_PATCH_LOCATION>/<GI_PSU_number>/<OCW Components_number>/custom/server/<OCW Components_number>
    $ <ORACLE_HOME>/OPatch/opatch apply -oh <ORACLE_HOME> -local <UNZIPPED_PATCH_LOCATION>/<GI_PSU_number>/<DB_PSU_number>
    
  6. Run the post script for DB component of the patch.

    As the database home owner execute:

    $ <UNZIPPED_PATCH_LOCATION>/<GI_PSU_number>/<OCW Components_number>/custom/server/<OCW Components_number>/custom/scripts/postpatch.sh -dbhome <ORACLE_HOME>
    
  7. Run the post script.

    As the root user execute:

    # <GI_HOME>/rdbms/install/rootadd_rdbms.sh
    

    If this is a GI Home, as the root user execute:

    # <GI_HOME>/crs/install/rootcrs.pl -patch
    

    If this is an Oracle Restart Home, as the root user execute:

    # <GI_HOME>/crs/install/roothas.pl -patch
    
  8. If the message, "A system reboot is recommended before using ACFS� is shown, then a reboot must be issued before continuing. Failure to do so will result in running with an unpatched ACFS\ADVM\OKS driver.

  9. Start the CRS managed resources that were earlier running from DB homes.

    If this is a GI Home environment, as the database home owner execute:

    $ <ORACLE_HOME>/bin/srvctl start home -o <ORACLE_HOME> -s <status file location> -n <node name>
    

    If this is an Oracle Restart Home environment, as the database home owner execute:

    $ <ORACLE_HOME>/bin/srvctl start home -o <ORACLE_HOME> -s <status file location> 
    
  10. Refer Section 2.5, "Patch Post-Installation Instructions" step after installing the patch

3.4 使用手动方式安装了刚才报错的补丁后,该节点的GI集群正常启动。

 

4、手动安装补丁的方式相对于opatch auto方式比较繁琐,但在特殊的情况下,真的能救命。

 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.hqwc.cn/news/797751.html

如若内容造成侵权/违法违规/事实不符,请联系编程知识网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

肖健飞的第一次作业

这个作业属于哪个课程 https://edu.cnblogs.com/campus/zjlg/rjjc这个作业的目标 进行自我评估,熟悉博客园的使用方法,阐述自己的课程期望姓名-学号 肖健飞-2022329301124一、自我介绍 (一)基本情况及爱好 我叫肖健飞,来自江苏泰州,是信息科学与工程学院22级自动化(2)班…

2024ICPC网络赛第一场题解(部分)

2024ICPC网络赛第一场题解和参考代码以及部分思路说明这一场基本纯挂件,给队友翻译翻译题面,帮队友打打板子了,可惜最后40sL题冲了一个 \(O(\frac{n^3}{w})\) 的bitset最后wa了,所以下面的题解我也只能看着队友代码说说大概,主要参考一下代码吧。 A 题意 给出32个队伍的能…

sign与unsigned的原理、数据存储与硬件的关系

目录关键字unsigned和signed数据在计算机中的存储原码 与 补码的转化与硬件关系原,反,补的原理:整型存储的本质变量存取的过程类型目前的作用十进制与二进制快速转换大小端字节序判断当前机器的字节序"负零"(-128)的理解截断建议在无符号类型的数值后带上u, 关键字un…

C++中对象的延迟构造

本文并不讨论“延迟初始化”或者是“懒加载的单例”那样的东西,本文要讨论的是分配某一类型所需的空间后不对类型进行构造(即对象的lifetime没有开始),更通俗点说,就是跳过对象的构造函数执行。 使用场景 我们知道,不管是定义某个类型的对象还是用operator new申请内存,…

黑客失误?76.2万车主,家庭住址信息泄露

​据Cybernews研究团队发现,一个包含76.2W名车主及其车辆详细信息的敏感数据库已经在网上泄露。这些数据托管在一个美国的IP地址上,首次发现是在8月4日,至少暴露了48小时。据该团队称,泄露的数据揭示了车主的敏感信息。泄露的细节几乎揭示了拥有车辆的个人的所有信息,包括…

C++ 在 Visual Studio 如何将指针星号设置成靠近变量而不是类型

“工具”->“选项”->“文本编辑器”->“C/C++”->“代码样式”->“格式设置”->“间距”->“指针/引用对齐方式”->“右对齐”。

Git冲突解决技巧

在多人协作的软件开发项目中,Git 冲突是不可避免的现象。当两个或更多的开发者同时修改了同一段代码,并且尝试将这些修改合并到一起时,冲突就发生了。解决这些冲突是确保代码库健康和项目顺利进行的关键。在多人协作的软件开发项目中,Git 冲突是不可避免的现象。当两个或更…

AI写作助手哪些好用?6款强大的AI写作助手值得收藏!

在内容创作日益重要的今天,AI写作助手已经成为许多创作者的得力工具。它们不仅能够提高写作效率,还能在一定程度上保证文章质量。面对市场上琳琅满目的AI写作助手,如何选择一款好用且适合自己的工具呢?以下推荐6款强大的AI写作助手,它们各具优势,助力创作者轻松应对各种写…

1928.规定时间内到达终点的最小话费,题解

1928. 规定时间内到达终点的最小花费 - 力扣(LeetCode) 有点难,参考官方题解代码: 利用了动态规划思想,逐步计算从起点到各个城市在不同时间下的最小费用。 1.代码解释,涉及,static关键字,constexpr关键字,INT_MAX除以2赋值的含义static constexpr int INFTY = INT_MA…

软件技术基础的第一次作业

这个作业属于哪个课程 https://edu.cnblogs.com/campus/zjlg/rjjc这个作业的目标 向教师和助教介绍自己,并熟悉博客园 对课程的期望姓名 颜宇航学号 20223293011251.个人介绍 大家好,我是22自动化2班的颜宇航,来自浙江台州。很高兴能够在这里与大家分享自己的生活!我是一个…

帝国cms密码忘记,帝国cms网站忘记登陆账号密码

如果你忘记了帝国CMS的管理员账号和密码,可以通过以下几种方法来找回或重置密码: 1. 通过数据库直接修改密码 如果你对数据库操作比较熟悉,可以采用此方法:登录数据库管理工具:使用phpMyAdmin或其他数据库管理工具登录到你的数据库。 找到管理员表:在数据库中找到存储管理…