ORACLE 12C ADG 安装最新RU补丁
admin
2023-04-14 14:02:03
0

参考文档:How do you apply a Patchset,PSU or CPU in a Data Guard Physical Standby configuration (文档 ID 278641.1)


------------------------------------------------------------------------------------------------------

1. Disable REDO transport on Primary.

------------------------------------------------------------------------------------------------------

sys@ora12c.primary> alter system set log_archive_dest_state_2=defer;


------------------------------------------------------------------------------------------------------

2. Shutdown the standby site and apply interim patchsets to the RDBMS binaries as per the README.

------------------------------------------------------------------------------------------------------


2.1 停数据库监听和实例

[oracle@oradb2 ~]$ lsnrctl stop

sys@ora12cdg.primary_instance> shudown immediate;


2.2 更新OPatch到最新版本 [You must use the OPatch utility version 12.2.0.1.14 or later to apply this patch.]

[oracle@oradb2 ~]$ mv $ORACLE_HOME/OPatch $ORACLE_HOME/OPatch.20190426

[oracle@oradb2 ~]$ mv /oradata/OPatch $ORACLE_HOME

[oracle@oradb2 ~]$ $ORACLE_HOME/OPatch/opatch version


2.3 执行补丁冲突检查

[oracle@oradb2 ~]$ cd /oradata/patch/29314339/

[oracle@oradb2 29314339]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph ./


2.4 应用12.2最新 Release Update 29314339

[oracle@oradb2 ~]$ cd /oradata/patch/29314339/

[oracle@oradb2 29314339]$ $ORACLE_HOME/OPatch/opatch apply

Oracle Interim Patch Installer version 12.2.0.1.17

Copyright (c) 2019, Oracle Corporation.  All rights reserved.


2.5 检查补丁信息

[oracle@oradb2 29314339]$ $ORACLE_HOME/OPatch/opatch lspatches

29314339;Database Apr 2019 Release Update : 12.2.0.1.190416 (29314339)

28163190;OCW JUL 2018 RELEASE UPDATE 12.2.0.1.180717 (28163190)


------------------------------------------------------------------------------------------------------

3. Start the standby site to mount only, do not restart managed recovery.

------------------------------------------------------------------------------------------------------


[oracle@oradb2 29314339]$ lsnrctl start

[oracle@oradb2 29314339]$ export ORACLE_SID=ora12cdg

idle> startup mount;


------------------------------------------------------------------------------------------------------

4. Shutdown the primary site, apply the Patchset/PSU/CPU patch to the RDBMS binaries and patch the RDBMS itself using the instructions in the README

------------------------------------------------------------------------------------------------------


4.1 停监听和主库

[oracle@oradb1 ~]$ lsnrctl stop

sys@ora12c.primary> shutdown immediate;


4.2 更新OPatch到最新版本

[oracle@oradb1 ~]$ mv $ORACLE_HOME/OPatch $ORACLE_HOME/OPatch.20190426

[oracle@oradb1 ~]$ mv /oradata/OPatch $ORACLE_HOME

[oracle@oradb1 ~]$ $ORACLE_HOME/OPatch/opatch version


4.3 执行补丁冲突检查

[oracle@oradb1 ~]$ cd /oradata/patch/29314339/

[oracle@oradb1 29314339]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph ./


4.4 应用12.2最新 Release Update 29314339

[oracle@oradb1 29314339]$ $ORACLE_HOME/OPatch/opatch apply

Oracle Interim Patch Installer version 12.2.0.1.17

Copyright (c) 2019, Oracle Corporation.  All rights reserved.


4.5 检查补丁信息

[oracle@oradb1 29314339]$ $ORACLE_HOME/OPatch/opatch lspatches

29314339;Database Apr 2019 Release Update : 12.2.0.1.190416 (29314339)

28163190;OCW JUL 2018 RELEASE UPDATE 12.2.0.1.180717 (28163190)


4.6 应用数据库补丁

[oracle@oradb1 29314339]$ sqlplus /nolog

idle> conn / as sysdba

idle> startup;

idle> show pdbs;


--如果pdb状态不是READ WRITE,打开pdb

idle> alter pluggable database all open;

idle> exit;


[oracle@oradb1 29314339]$ cd $ORACLE_HOME/OPatch

[oracle@oradb1 OPatch]$ ./datapatch -verbose


Note:  Datapatch will only apply or rollback SQL fixes for PDBs

       that are in an open state, no patches will be applied to closed PDBs.

       Please refer to Note: Datapatch: Database 12c Post Patch SQL Automation

       (Doc ID 1585822.1)


SQL Patching tool complete on Fri Apr 26 13:55:24 2019


4.7 检查补丁应用日志

[oracle@oradb1 OPatch]$ cd $ORACLE_BASE/cfgtoollogs/sqlpatch/29314339/


Check the following log files in $ORACLE_BASE/cfgtoollogs/sqlpatch/29314339/ for errors:

29314339_apply___.log


4.8 编译无效对象

[oracle@oradb1 29314339]$ cd $ORACLE_HOME/rdbms/admin


[oracle@oradb1 admin]$ sqlplus /nolog

idle> conn / as sysdba

sys@ora12c.primary> set linesize 160;

sys@ora12c.primary> col owner for a15;

sys@ora12c.primary> select owner, count(1) from dba_objects where status = 'INVALID' group by owner;


sys@ora12c.primary> @utlrp.sql


sys@ora12c.primary> select owner, count(1) from dba_objects where status = 'INVALID' group by owner;


------------------------------------------------------------------------------------------------------

5. Start the primary site, re-enable log shipping to the standby.

------------------------------------------------------------------------------------------------------


sys@ora12c.primary> alter system set log_archive_dest_state_2=enable;


------------------------------------------------------------------------------------------------------

6. At the standby site start the MRP(managed recovery).

------------------------------------------------------------------------------------------------------


sys@ora12cdg.physical_standby> alter database open;

sys@ora12cdg.physical_standby> alter database recover managed standby database disconnect from session;


------------------------------------------------------------------------------------------------------

7. 主备切换

------------------------------------------------------------------------------------------------------

sys@ora12c.primary> alter database switchover to ora12cdg verify;


sys@ora12c.primary> alter database switchover to ora12cdg;


相关内容

热门资讯

【第一消息】“新毛豆炸/金/花... 【第一消息】“新毛豆炸/金/花开挂神器?”(确实真的有挂)您好,新毛豆炸/金/花这个游戏其实有挂的,...
我来教教您“小南四川长牌开挂器... 家人们!今天小编来为大家解答小南四川长牌透视挂怎么安装这个问题咨询软件客服徽9784099的挂在哪里...
重磅消息“授权大厅牛牛到底是不... 家人们!今天小编来为大家解答授权大厅牛牛透视挂怎么安装这个问题咨询软件客服徽4282891的挂在哪里...
【第一消息】“天天微友棋牌真的... 网上科普关于“天天微友棋牌有没有挂”话题很是火热,小编也是针对天天微友棋牌作*弊开挂的方法以及开挂对...
重磅消息“乐享牛牛是不是有挂?... 家人们!今天小编来为大家解答乐享牛牛透视挂怎么安装这个问题咨询软件客服徽4282891的挂在哪里买很...
玩家最新攻略“微信拼三张有没有... 网上科普关于“微信拼三张有没有挂”话题很是火热,小编也是针对微信拼三张作*弊开挂的方法以及开挂对应的...
【第一资讯】“闽悦麻将真的有挂... 有 亲,根据资深记者爆料闽悦麻将是可以开挂的,确实有挂(咨询软件无需打开...
终于懂了“卡农炸/金/花真的有... 您好:卡农炸/金/花这款游戏可以开挂,确实是有挂的,需要了解加客服微信【9784099】很多玩家在这...
重磅消息“新皇豪牛牛到底是不是... 重磅消息“新皇豪牛牛到底是不是挂?”(太坑了果然有挂)您好,新皇豪牛牛这个游戏其实有挂的,确实是有挂...
终于了解“笑傲江湖究竟有挂吗?... 您好:笑傲江湖这款游戏可以开挂,确实是有挂的,需要了解加客服微信【9752949】很多玩家在这款游戏...