本帖最后由 郑全 于 2020-11-25 22:25 编辑
1.先更新DB,GI 的OPATCH版本到最新版本
2.关闭二号几点 GI
3.在一号节点打GI的ru
[root@db1 ~]# /u01/app/19.3.0/grid/OPatch/opatchauto apply /u01/setup/patch/30899722 -oh /u01/app/19.3.0/grid -nonrolling
成功后,关闭集群服务
4.再打二号节点的GI 的RU
[root@db2 ~]# /u01/app/19.3.0/grid/OPatch/opatchauto apply /u01/setup/patch/30899722 -oh /u01/app/19.3.0/grid -nonrolling
成功后,关闭集群服务
5.再在一号机打DB RU [root@db1 ~]# /u01/app/oracle/product/19.3.0/db_1/OPatch/opatchauto apply /u01/setup/patch/30899722 -oh /u01/app/oracle/product/19.3.0/db_1/ -nonrolling
6.再去二号机安装DB RU
[root@db2 ~]# /u01/app/oracle/product/19.3.0/db_1/OPatch/opatchauto apply /u01/setup/patch/30899722 -oh /u01/app/oracle/product/19.3.0/db_1/ -nonrolling 可能报错:
报错一:
/u01/app/oraInventory/ContentsXML/oui-patch.xml (Permission denied)
解决办法: chmod 660 /u01/app/oraInventory/ContentsXML/oui-patch.xml
/u01/app/oracle/product/19.3.0/db_1/OPatch/opatchauto resume
报错二:
Unable to create patchObject
解决办法:
从一号机把对应的补丁拷贝过去。
再去执行DB RU脚本即可。
7.应用SQL
在一个节点上执行即可
sqlplus /nolog
startup
有多租户
alter pluggable database all open;
cd $ORACLE_HOME/OPatch
./datapatch -verbose
编译无效对象
sql>@?/rdbms/admin/utlrp.sql
8.确认RU
[oracle@db1 OPatch]$ ./opatch lspatches
30894985;OCW RELEASE UPDATE 19.7.0.0.0 (30894985)
30869156;Database Release Update : 19.7.0.0.200414 (30869156)
OPatch succeeded.
[oracle@db1 OPatch]$ exit
logout
[root@db1 ~]# su - grid
Last login: 六 6月 20 00:18:14 CST 2020
[grid@db1 ~]$ cd $ORACLE_HOME/OPatch
[grid@db1 OPatch]$ ./opatch lspatches
30898856;TOMCAT RELEASE UPDATE 19.0.0.0.0 (30898856)
30894985;OCW RELEASE UPDATE 19.7.0.0.0 (30894985)
30869304;ACFS RELEASE UPDATE 19.7.0.0.0 (30869304)
30869156;Database Release Update : 19.7.0.0.200414 (30869156)
OPatch succeeded.SQL> conn / as sysdba
Connected.
SQL> select PATCH_ID,PATCH_TYPE,ACTION,STATUS,TARGET_VERSION from dba_registry_sqlpatch;
PATCH_ID PATCH_TYPE ACTION STATUS TARGET_VERSION
---------- ---------- --------------- ------------------------- ---------------
29517242 RU APPLY SUCCESS 19.3.0.0.0
30869156 RU APPLY SUCCESS 19.7.0.0.0
SQL>
|