19c新环境安装补丁(三)_推荐

 本次安装Oracle RAC 19.3 版本 Linux red-hat 7.8  DB安装补丁  RUR 20200717、

 

本次安装Oracle补丁的方法类似于11G RAC打补丁的方法。  【可以更近一步优化,在DBCA建库之前 对GI, ORACLE 软件安装psu补丁,后续不在需要对DB再次执行脚本】

一、GI 安装补丁

操作之前,用最新的OPATCH 工具替换现有的OPATCH版本
对GI安装补丁,需要CRS软件启动状态,才可以进行补丁实施

节点1操作
# /u01/app/19.0.0/grid/OPatch/opatchauto apply /u01/soft/31326451 -oh /u01/app/19.0.0/grid
检查确认
/u01/app/19.0.0/grid/OPatch]$ ./opatch lsinventory
节点2操作
# /u01/app/19.0.0/grid/OPatch/opatchauto apply /u01/soft/31326451 -oh /u01/app/19.0.0/grid

 二、Oracle软件安装node1(走了歪路)

1) 权限修改
$ ls -lrt /u01/app/oraInventory/ContentsXML/oui-patch.xml -rw-r----- 1 grid oinstall 174 Aug 12 15:38 /u01/app/oraInventory/ContentsXML/oui-patch.xml

$ chmod 777 /u01/app/oraInventory/ContentsXML/oui-patch.xml

 

 2)直接打补丁,报错后回滚

节点1操作

#/u01/app/oracle/product/19.0.0/db_1/OPatch/opatchauto apply /u01/soft/31326451 -oh /u01/app/oracle/product/19.0.0/db_1

OPATCHAUTO-68061: The orchestration engine failed.
OPATCHAUTO-68061: The orchestration engine failed with return code 1
OPATCHAUTO-68061: Check the log for more details.
OPatchAuto failed.

查询日志

[Aug 12, 2020 4:04:19 PM] [INFO] Prerequisite check “CheckActiveFilesAndExecutables” failed.
The details are:

Following active executables are not used by opatch process :

Following active executables are used by opatch process :
/u01/app/oracle/product/19.0.0/db_1/lib/libclntsh.so.19.1
/u01/app/oracle/product/19.0.0/db_1/lib/libsqlplus.so
[Aug 12, 2020 4:04:19 PM] [INFO] UtilSession failed: Prerequisite check “CheckActiveFilesAndExecutables” failed.
[Aug 12, 2020 4:04:19 PM] [SEVERE] OUI-67073:UtilSession failed: Prerequisite check “CheckActiveFilesAndExecutables” failed.

 

#/u01/app/oracle/product/19.0.0/db_1/OPatch/opatchauto rollback /u01/soft/31326451 -oh /u01/app/oracle/product/19.0.0/db_1

 3)停CRS 及TFA

# /u01/app/19.0.0/grid/bin/crsctl stop crs

$ /u01/app/19.0.0/grid/bin/tfactl status

.———————————————————————————————-.
| Host | Status of TFA | PID | Port | Version | Build ID | Inventory Status |
+——–+—————+——-+——+————+———————-+——————+
| w1 | RUNNING | 30174 | 5000 | 20.1.3.0.0 | 201300202004291616 | COMPLETE |
| w2 | RUNNING | 55888 | 5000 | 20.1.3.0.0 | 201300202004291616 | COMPLETE |
‘——–+—————+——-+——+————+———————-+——————‘

# /u01/app/19.0.0/grid/bin/tfactl stop
Stopping TFA from the Command Line
Stopped OSWatcher
Nothing to do !
Killing TFA running with pid 30174
. . .
Successfully stopped TFA..

  4)根据报错指定的文件,通过fuser 找到对应的进程,kill

# fuser /u01/app/oracle/product/19.0.0/db_1/lib/libclntsh.so.19.1
/u01/app/oracle/product/19.0.0/db_1/lib/libclntsh.so.19.1: 9912m
# ps -ef|grep 9912 |grep -v grep
oracle 9912 5796 0 14:57 pts/3 00:00:00 sqlplus as sysdba
# fuser /u01/app/oracle/product/19.0.0/db_1/lib/libsqlplus.so
/u01/app/oracle/product/19.0.0/db_1/lib/libsqlplus.so: 9912m
# kill -9 9912

  5)补丁安装

#/u01/app/oracle/product/19.0.0/db_1/OPatch/opatchauto apply /u01/soft/31326451 -oh /u01/app/oracle/product/19.0.0/db_1

  6)启动TFA 及 CRS 

# /u01/app/19.0.0/grid/bin/tfactl start

# /u01/app/19.0.0/grid/bin/crsctl start crs

 

 三、Oracle软件安装node2(推荐)

1) 权限修改
$ ls -lrt /u01/app/oraInventory/ContentsXML/oui-patch.xml -rw-r----- 1 grid oinstall 174 Aug 12 15:38 /u01/app/oraInventory/ContentsXML/oui-patch.xml

$ chmod 777 /u01/app/oraInventory/ContentsXML/oui-patch.xml

2)检查SQLPLUS进程 【local=no进程都需要kill,如果是生产环境,提前停监听资源】
# ps -ef|grep sqlplus |grep -v grep oracle 38075 37677 0 16:27 pts/1 00:00:00 sqlplus as sysdba # kill -9 38075

3)补丁安装

#/u01/app/oracle/product/19.0.0/db_1/OPatch/opatchauto apply /u01/soft/31326451 -oh /u01/app/oracle/product/19.0.0/db_1

 

四、DB补丁安装[新安装的环境,可以DBCA之前打GI,ORACLE pus即可,无需执行脚本】

1.For each separate database running on the same shared Oraclehome being patched, run the datapatchutility as described in Table1-3.
Single/Multitenant(CDB/PDB) DB
$ sqlplus /nolog
SQL> Connect / as sysdba
SQL> startup
SQL> alter pluggable database all open;
SQL> quit
$cd $ORACLE_HOME/OPatch
$./datapatch -verbose
2.Check the following log files in $ORACLE_BASE/cfgtoollogs/sqlpatch/30446054/<unique patchID> for errors
3.Any databases that have invalid objects after the executionof datapatch should have utlrp.sql run to revalidate thoseobjects.
For example:
cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> @utlrp.sql

4.check

SQL> set line 200 pages 1000
col NAMESPACE for a18
col COMMENTS for a30
col ACTION_TIME for a40
col ACTION for a20
col VERSION for a10
col BUNDLE_SERIES for a20
select * from DBA_REGISTRY_HISTORY;

SQL> select * from DBA_REGISTRY_HISTORY;

ACTION_TIME ACTION NAMESPACE VERSION ID COMMENTS BUNDLE_SERIES
—————————————- ——————– —————— ———- —
BOOTSTRAP DATAPATCH 19 RDBMS_19.6.0.0.0DBRUR_LINUX.X64_200614
12-AUG-20 02.37.10.870555 PM

RU_APPLY SERVER 19.0.0.0.0 Patch applied on 19.3.0.0.0: Release_Update -190410122720

 

12-AUG-20 04.40.07.125440 PM

RU_APPLY SERVER 19.0.0.0.0 Patch applied from 19.3.0.0.0 to 19.6.2.0.0:
Release_Update_Revision – 200614162643

 

 

 

 

本站资源均源自网络,若涉及您的版权、知识产权或其他利益,请附上版权证明邮件告知。收到您的邮件后,我们将在72小时内删除。
若下载资源地址错误或链接跳转错误请联系站长。站长q:770044133。

» 19c新环境安装补丁(三)_推荐

发表评论

免登录下载网,提供全网最优质的资源集合!