溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

ORACLE 12C ADG 安裝最新RU補丁

發布時間:2020-07-07 05:14:02 來源:網絡 閱讀:789 作者:背向天堂 欄目:關系型數據庫

參考文檔: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/<unique patch ID> for errors:

29314339_apply_<database SID>_<CDB name>_<timestamp>.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;


向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

亚洲午夜精品一区二区_中文无码日韩欧免_久久香蕉精品视频_欧美主播一区二区三区美女