ADG級聯備庫環境PSU應用驗證

2023-05-23 12:01:12

上篇文章

我只在中間備庫環境應用了PSU,解決了級聯備庫從中間備庫duplicate資料庫的問題:

細心的朋友已經發現,因為是備庫環境,並沒有做資料庫執行相關指令碼部分,所以如果去DB查詢修補程式應用資訊是沒有的:

SQL> r
  1*  select * from dba_registry_history

ACTION_TIME                   ACTION         NAMESPACE        VERSION        ID BUNDLE_SERIES      COMMENTS
--------------------------------------------------------------------------- ------------------------------ ------------------------------ ------------------------------ ---------- ------------------------------ ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
17-SEP-11 10.21.11.595816 AM                APPLY        SERVER       11.2.0.3          0 PSU          Patchset 11.2.0.2.0
04-APR-23 04.37.58.780922 PM                APPLY        SERVER       11.2.0.3          0 PSU          Patchset 11.2.0.2.0

本篇文章就繼續把級聯備庫以及主庫的PSU軟體修補程式打上,步驟和上篇無區別,不再贅述。
最後要在主庫按照readme執行對應指令碼(只需在主庫執行哦,通過ADG基理會將這些改變自動同步到備庫):

cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> STARTUP
SQL> @catbundle.sql psu apply
SQL> QUIT

再次看狀態:

set lines 1000
select * from dba_registry_history;

SQL> set lines 1000
select * from dba_registry_history;SQL>

ACTION_TIME                   ACTION         NAMESPACE        VERSION        ID BUNDLE_SERIES      COMMENTS
--------------------------------------------------------------------------- ------------------------------ ------------------------------ ------------------------------ ---------- ------------------------------ ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
17-SEP-11 10.21.11.595816 AM                APPLY        SERVER       11.2.0.3          0 PSU          Patchset 11.2.0.2.0
04-APR-23 04.37.58.780922 PM                APPLY        SERVER       11.2.0.3          0 PSU          Patchset 11.2.0.2.0
22-MAY-23 04.55.20.039373 PM                APPLY        SERVER       11.2.0.3         15 PSU          PSU 11.2.0.3.15

最後去備庫,以及級聯備庫分別確認同步狀態:

備庫狀態:已有11.2.0.3.15資訊

[oracle@db11gadg ~]$ 

SQL> @dg

NAME           VALUE          UNIT           TIME_COMPUTED        DATUM_TIME
---------------------- ---------------------- ------------------------------ ------------------------------ ------------------------------
transport lag        +00 00:00:00       day(2) to second(0) interval   05/22/2023 16:56:04      05/22/2023 16:56:03
apply lag        +00 00:00:00       day(2) to second(0) interval   05/22/2023 16:56:04      05/22/2023 16:56:03
apply finish time      +00 00:00:00.000       day(2) to second(3) interval   05/22/2023 16:56:04
estimated startup time 9          second           05/22/2023 16:56:04

SQL> set lines 1000
select * from dba_registry_history;SQL>

ACTION_TIME                   ACTION         NAMESPACE        VERSION        ID BUNDLE_SERIES      COMMENTS
--------------------------------------------------------------------------- ------------------------------ ------------------------------ ------------------------------ ---------- ------------------------------ ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
17-SEP-11 10.21.11.595816 AM                APPLY        SERVER       11.2.0.3          0 PSU          Patchset 11.2.0.2.0
04-APR-23 04.37.58.780922 PM                APPLY        SERVER       11.2.0.3          0 PSU          Patchset 11.2.0.2.0
22-MAY-23 04.55.20.039373 PM                APPLY        SERVER       11.2.0.3         15 PSU          PSU 11.2.0.3.15

級聯備庫狀態:在主庫切紀錄檔後也會有11.2.0.3.15資訊:

[oracle@db11gcas ~]$

SQL> @dg

NAME           VALUE          UNIT           TIME_COMPUTED        DATUM_TIME
---------------------- ---------------------- ------------------------------ ------------------------------ ------------------------------
transport lag        +00 00:00:48       day(2) to second(0) interval   05/22/2023 16:56:50      05/22/2023 16:56:06
apply lag        +00 00:00:48       day(2) to second(0) interval   05/22/2023 16:56:50      05/22/2023 16:56:06
apply finish time           day(2) to second(3) interval   05/22/2023 16:56:50
estimated startup time 9          second           05/22/2023 16:56:50

SQL> set lines 1000
select * from dba_registry_history;SQL>

ACTION_TIME                   ACTION         NAMESPACE        VERSION        ID BUNDLE_SERIES      COMMENTS
--------------------------------------------------------------------------- ------------------------------ ------------------------------ ------------------------------ ---------- ------------------------------ ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
17-SEP-11 10.21.11.595816 AM                APPLY        SERVER       11.2.0.3          0 PSU          Patchset 11.2.0.2.0
04-APR-23 04.37.58.780922 PM                APPLY        SERVER       11.2.0.3          0 PSU          Patchset 11.2.0.2.0

SQL> /

ACTION_TIME                   ACTION         NAMESPACE        VERSION        ID BUNDLE_SERIES      COMMENTS
--------------------------------------------------------------------------- ------------------------------ ------------------------------ ------------------------------ ---------- ------------------------------ ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
17-SEP-11 10.21.11.595816 AM                APPLY        SERVER       11.2.0.3          0 PSU          Patchset 11.2.0.2.0
04-APR-23 04.37.58.780922 PM                APPLY        SERVER       11.2.0.3          0 PSU          Patchset 11.2.0.2.0
22-MAY-23 04.55.20.039373 PM                APPLY        SERVER       11.2.0.3         15 PSU          PSU 11.2.0.3.15

SQL> @dg

NAME           VALUE          UNIT           TIME_COMPUTED        DATUM_TIME
---------------------- ---------------------- ------------------------------ ------------------------------ ------------------------------
transport lag        +00 00:00:00       day(2) to second(0) interval   05/22/2023 16:57:18      05/22/2023 16:57:11
apply lag        +00 00:00:00       day(2) to second(0) interval   05/22/2023 16:57:18      05/22/2023 16:57:11
apply finish time           day(2) to second(3) interval   05/22/2023 16:57:18
estimated startup time 9          second           05/22/2023 16:57:18


SQL> @dg

NAME           VALUE          UNIT           TIME_COMPUTED        DATUM_TIME
---------------------- ---------------------- ------------------------------ ------------------------------ ------------------------------
transport lag        +00 00:00:56       day(2) to second(0) interval   05/22/2023 16:58:16      05/22/2023 16:58:07
apply lag        +00 00:00:56       day(2) to second(0) interval   05/22/2023 16:58:16      05/22/2023 16:58:07
apply finish time           day(2) to second(3) interval   05/22/2023 16:58:16
estimated startup time 9          second           05/22/2023 16:58:16

都沒問題了,整個過程也符合PSU修補程式應用邏輯。