标签:execute RAC 补丁 0.4 11.2 opatch Oracle owner home
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.
-
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. |
-
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
-
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>
-
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>
-
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>
-
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>
-
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
-
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.
-
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>
- Refer Section 2.5, "Patch Post-Installation Instructions" step after installing the patch
|
3.4 使用手动方式安装了刚才报错的补丁后,该节点的GI集群正常启动。
4、手动安装补丁的方式相对于opatch auto方式比较繁琐,但在特殊的情况下,真的能救命。
标签:execute,
RAC,
补丁,
0.4,
11.2,
opatch,
Oracle,
owner,
home
From: https://www.cnblogs.com/missyou-shiyh/p/18415581