解析一下DataGuard環境裡出現archivelog gap的兩個場景
<<< Redo Transport階段出現archivelog gap >>>
測試環境描述:
prmy : tstdb1
stdby : tstdb1_stdby1
DG工作在MAXIMUM PERFORMANCE模式下
測試過程描述:tstdb1_stdby1 shutdown->在tstdb1上switch logfile若干次->tstdb1_stdby1重新啟動->觀察tstdb1上生成的archivelog已經傳送到了tstdb1_stdby1
###DG工作在MAXIMUM PERFORMANCE模式
---tstdb1:
SQL> select db_unique_name,database_role,protection_mode,protection_level,open_mode,SWITCHOVER_STATUS from v$database;
DB_UNIQUE_NAME DATABASE_ROLE PROTECTION_MODE PROTECTION_LEVEL OPEN_MODE SWITCHOVER_STATUS
--------------- ---------------- -------------------- -------------------- -------------------- --------------------
tstdb1 PRIMARY MAXIMUM PERFORMANCE MAXIMUM PERFORMANCE READ WRITE SESSIONS ACTIVE
---tstdb1_stdby1:
SQL> select db_unique_name,database_role,protection_mode,protection_level,open_mode,SWITCHOVER_STATUS from v$database;
DB_UNIQUE_NAME DATABASE_ROLE PROTECTION_MODE PROTECTION_LEVEL OPEN_MODE SWITCHOVER_STATUS
--------------- ---------------- -------------------- -------------------- -------------------- --------------------
tstdb1_stdby1 PHYSICAL STANDBY MAXIMUM PERFORMANCE MAXIMUM PERFORMANCE READ ONLY WITH APPLY NOT ALLOWED
###關閉tstdb1_stdby1:
---關閉前記錄一下當前最大的archivelog sequence#
SQL> select max(sequence#) from v$archived_log where RESETLOGS_CHANGE#=(select RESETLOGS_CHANGE# from v$database_incarnation where status='CURRENT');
MAX(SEQUENCE#)
--------------
93
alter database recover managed standby database cancel;
shutdown abort
###tstdb1執行switch logfile的操作
SYS@tstdb1-SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 91
Next log sequence to archive 94
Current log sequence 94
alter system switch logfile;
alter system switch logfile;
alter system switch logfile;
SYS@tstdb1-SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 91
Next log sequence to archive 97
Current log sequence 97
其中seq#94~96的三個archivelog將在tstdb1_stdby1啟動後自動傳輸到tstdb1_stdby1
###tstdb1_stdby1:重新啟動後,檢查94~96的日誌已經接收過來了
startup
SQL> select *from v$archive_gap; <---v$archive_gap內容是空的
no rows selected
****等待reopen所指定的時間(預設300s)後,接收到了tstdb1傳來的archivelog
col name format a90
set linesize 180
SQL> select sequence#,name,fal,creator,registrar from v$archived_log where sequence#>=93 and RESETLOGS_CHANGE#=(select RESETLOGS_CHANGE# from v$database_incarnation where status='CURRENT') order by sequence#;
SEQUENCE# NAME FAL CREATOR REGISTR
---------- ------------------------------------------------------------------------------------------ --- ------- -------
93 /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_93_1mLXovJhM_.arc NO ARCH RFS
94 /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_94_1mLZMUNCf_.arc NO ARCH RFS <---FAL=NO,是因為tstdb1_stdby1 shutdown之前seq# 94已經在tstdb1上作為current redolog了
95 /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_95_1mLZMSt-v_.arc YES ARCH RFS <---FAL=YES
96 /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_96_1mLZMS9c8_.arc YES ARCH RFS <---FAL=YES
97 /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_97_1mLZMTSce_.arc NO ARCH RFS
上述94~96三個archivelog的傳輸是由ARCn[primary側]與RFSn[standby側]的這兩個程式間通訊完成的;這種archive gap主要發生在primary與standby間的網路故障或者standby例項當機,導致primary產生的redolog無法在第一時間傳送到standby主機,等到網路或者standby主機恢復後透過RFSn、ARCn程式將redo補傳到standby主機
<<< Redo Apply階段出現archivelog gap >>>
測試環境:
primary: tstdb1
stdby: tstdb1_stdby1
---tstdb1_stdby1:把tstdb1_stdby1上的MRP程式停掉
alter database recover managed standby database cancel;
---tstdb1: 連續Switch幾次logfile
alter system switch logfile; <---執行若干次
---tstdb1_stdby1: 因為MRP停止所以看到seq# 94開始的archivelog都沒有apply
SQL> select sequence#,name,fal,creator,registrar,completion_time,applied from v$archived_log where sequence#>=93 and RESETLOGS_CHANGE#=(select RESETLOGS_CHANGE# from v$database_incarnation where status='CURRENT') order by sequence#;
SEQUENCE# NAME FAL CREATOR REGISTR COMPLETION_TIME APPLIED
---------- ------------------------------------------------------------------------------------------ --- ------- ------- ----------------- ---------
93 /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_93_1mLXovJhM_.arc NO ARCH RFS 20150928 15:03:25 YES
94 /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_94_1mLZMUNCf_.arc NO ARCH RFS 20150928 15:31:16 NO
95 /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_95_1mLZMSt-v_.arc YES ARCH RFS 20150928 15:31:15 NO
96 /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_96_1mLZMS9c8_.arc YES ARCH RFS 20150928 15:31:15 NO
97 /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_97_1mLZMTSce_.arc NO ARCH RFS 20150928 15:31:16 NO
98 /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_98_1mLaMwijv_.arc NO ARCH RFS 20150928 15:49:17 NO
99 /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_99_1mLaMvX29_.arc YES ARCH RFS 20150928 15:49:17 NO
100 /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_100_1mLaMutXu_.arc YES ARCH RFS 20150928 15:49:16 NO
101 /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_101_1mLaMvZmx_.arc YES ARCH RFS 20150928 15:49:17 NO
102 /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_102_1mLaMwlA9_.arc YES ARCH RFS 20150928 15:49:17 NO
103 /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_103_1mLaMwux8_.arc YES ARCH RFS 20150928 15:49:17 NO
104 /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_104_1mLaMwzpf_.arc YES ARCH RFS 20150928 15:49:17 NO
105 /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_105_1mLaN0VvY_.arc NO ARCH RFS 20150928 15:49:18 NO
106 /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_106_1mLaN9x5D_.arc NO ARCH RFS 20150928 15:49:21 NO
107 /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_107_1mLa-Hquy_.arc NO ARCH RFS 20150928 16:00:17 NO
108 /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_108_1mLa-HQ0E_.arc YES ARCH RFS 20150928 16:00:17 NO
109 /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_109_1mLa-HRGz_.arc YES ARCH RFS 20150928 16:00:17 NO
110 /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_110_1mLapYURG_.arc YES ARCH RFS 20150928 15:57:17 NO
111 /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_111_1mLapednu_.arc NO ARCH RFS 20150928 15:57:19 NO
112 /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_112_1mLapmLM__.arc NO ARCH RFS 20150928 15:57:21 NO
113 /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_113_1mLatCu7l_.arc NO ARCH RFS 20150928 15:58:19 NO
21 rows selected.
---tstdb1_stdby1: 模擬archivelog gap的場景,我們故意將seq# 97~99,seq# 102~104共六個archivelog挪走
mv /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_97_1mLZMTSce_.arc /oradata06/
mv /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_98_1mLaMwijv_.arc /oradata06/
mv /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_99_1mLaMvX29_.arc /oradata06/
mv /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_102_1mLaMwlA9_.arc /oradata06/
mv /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_103_1mLaMwux8_.arc /oradata06/
mv /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_104_1mLaMwzpf_.arc /oradata06/
---tstdb1:將seq# 102~104三個archivelog也挪走
mv /oradata06/fra/TSTDB1/archivelog/2015_09_28/o1_mf_1_102_1mLZd-S_d_.arc /oradata06/
mv /oradata06/fra/TSTDB1/archivelog/2015_09_28/o1_mf_1_103_1mLZd_sEl_.arc /oradata06/
mv /oradata06/fra/TSTDB1/archivelog/2015_09_28/o1_mf_1_104_1mLZe1E7j_.arc /oradata06/
---tstdb1: fal_*引數的設定為空:
show parameter fal_
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
fal_client string
fal_server string
---tstdb1_stdby1: fal_*引數的設定也為空:
show parameter fal_
NAME TYPE VALUE
------------------------------------ ---------- ------------------------------
fal_client string
fal_server string
---tstdb1_stdby1:重新開啟managed recovery
alter database recover managed standby database using current logfile disconnect;
***tstdb1_stdby1 alert.log顯示:
Mon Sep 28 16:19:09 2015
alter database recover managed standby database using current logfile disconnect
Attempt to start background Managed Standby Recovery process (tstdb1_stdby1)
Mon Sep 28 16:19:09 2015
MRP0 started with pid=31, OS id=2752792
MRP0: Background Managed Standby Recovery process started (tstdb1_stdby1)
started logmerger process
Mon Sep 28 16:19:14 2015
Managed Standby Recovery starting Real Time Apply
Parallel Media Recovery started with 16 slaves
Waiting for all non-current ORLs to be archived...
All non-current ORLs have been archived.
Media Recovery Log /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_94_1mLZMUNCf_.arc
Media Recovery Log /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_95_1mLZMSt-v_.arc
Media Recovery Log /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_96_1mLZMS9c8_.arc
Media Recovery Log /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_97_1mLZMTSce_.arc
Error opening /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_97_1mLZMTSce_.arc <---seq# 97無法open
Attempting refetch
Media Recovery Waiting for thread 1 sequence 97
Fetching gap sequence in thread 1, gap sequence 97-97
FAL[client]: Error fetching gap sequence, no FAL server specified <----fal_server沒有定義找不到fal_server而報錯,但從接下來的日誌來看seq# 97還是能成功傳過來
Completed: alter database recover managed standby database using current logfile disconnect
Mon Sep 28 16:19:18 2015
RFS[2]: Allowing overwrite of partial archivelog for thread 1 sequence 97
RFS[2]: Opened log for thread 1 sequence 97 dbid 2051793563 branch 891526089
Archived Log entry 326 added for thread 1 sequence 97 rlc 891526089 ID 0x7ab78c1e dest 2: <--- seq# 97註冊到controlfile
Media Recovery Log /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_97_1mLc2IJRe_.arc <--- applying seq# 97
Media Recovery Log /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_98_1mLaMwijv_.arc
Error opening /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_98_1mLaMwijv_.arc
Attempting refetch
Media Recovery Waiting for thread 1 sequence 98
Fetching gap sequence in thread 1, gap sequence 98-98
FAL[client]: Error fetching gap sequence, no FAL server specified
Mon Sep 28 16:19:29 2015
FAL[client]: Error fetching gap sequence, no FAL server specified
Mon Sep 28 16:19:39 2015
FAL[client]: Error fetching gap sequence, no FAL server specified
Mon Sep 28 16:19:49 2015
FAL[client]: Error fetching gap sequence, no FAL server specified
Mon Sep 28 16:19:59 2015
FAL[client]: Error fetching gap sequence, no FAL server specified
Mon Sep 28 16:20:09 2015
FAL[client]: Error fetching gap sequence, no FAL server specified
Mon Sep 28 16:20:18 2015
RFS[2]: Allowing overwrite of partial archivelog for thread 1 sequence 98
RFS[2]: Opened log for thread 1 sequence 98 dbid 2051793563 branch 891526089
Archived Log entry 327 added for thread 1 sequence 98 rlc 891526089 ID 0x7ab78c1e dest 2: <--- seq# 98註冊到controlfile
Mon Sep 28 16:20:19 2015
Media Recovery Log /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_98_1mLc5tSbd_.arc <--- applying seq# 98
Media Recovery Log /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_99_1mLaMvX29_.arc
Error opening /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_99_1mLaMvX29_.arc
Attempting refetch
Media Recovery Waiting for thread 1 sequence 99
Fetching gap sequence in thread 1, gap sequence 99-99
FAL[client]: Error fetching gap sequence, no FAL server specified
Mon Sep 28 16:20:30 2015
FAL[client]: Error fetching gap sequence, no FAL server specified
Mon Sep 28 16:20:40 2015
FAL[client]: Error fetching gap sequence, no FAL server specified
Mon Sep 28 16:20:50 2015
FAL[client]: Error fetching gap sequence, no FAL server specified
Mon Sep 28 16:21:00 2015
FAL[client]: Error fetching gap sequence, no FAL server specified
Mon Sep 28 16:21:10 2015
FAL[client]: Error fetching gap sequence, no FAL server specified
Mon Sep 28 16:21:18 2015
RFS[2]: Allowing overwrite of partial archivelog for thread 1 sequence 99
RFS[2]: Opened log for thread 1 sequence 99 dbid 2051793563 branch 891526089
Archived Log entry 328 added for thread 1 sequence 99 rlc 891526089 ID 0x7ab78c1e dest 2:
Media Recovery Log /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_99_1mLc9Sctz_.arc
Media Recovery Log /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_100_1mLaMutXu_.arc
Media Recovery Log /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_101_1mLaMvZmx_.arc
Media Recovery Log /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_102_1mLaMwlA9_.arc
Error opening /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_102_1mLaMwlA9_.arc
Attempting refetch
Media Recovery Waiting for thread 1 sequence 102
Fetching gap sequence in thread 1, gap sequence 102-102 <---因為seq# 102~104在primary上也已經挪走了所以無法get過來
FAL[client]: Error fetching gap sequence, no FAL server specified
Mon Sep 28 16:21:29 2015
FAL[client]: Error fetching gap sequence, no FAL server specified
Mon Sep 28 16:21:39 2015
FAL[client]: Error fetching gap sequence, no FAL server specified
Mon Sep 28 16:21:49 2015
FAL[client]: Error fetching gap sequence, no FAL server specified
Mon Sep 28 16:21:59 2015
FAL[client]: Error fetching gap sequence, no FAL server specified
Mon Sep 28 16:22:09 2015
FAL[client]: Error fetching gap sequence, no FAL server specified
Mon Sep 28 16:22:19 2015
FAL[client]: Error fetching gap sequence, no FAL server specified
Mon Sep 28 16:22:29 2015
FAL[client]: Error fetching gap sequence, no FAL server specified
Mon Sep 28 16:22:39 2015
FAL[client]: Error fetching gap sequence, no FAL server specified
Mon Sep 28 16:22:49 2015
FAL[client]: Error fetching gap sequence, no FAL server specified
Mon Sep 28 16:22:59 2015
FAL[client]: Error fetching gap sequence, no FAL server specified
Mon Sep 28 16:23:09 2015
FAL[client]: Failed to request gap sequence
GAP - thread 1 sequence 102-102
DBID 2051793563 branch 891526089
FAL[client]: All defined FAL servers have been attempted.
------------------------------------------------------------
Check that the CONTROL_FILE_RECORD_KEEP_TIME initialization <----表眀resolve archivelog gap要依賴於v$archived_log;
parameter is defined to a value that's sufficiently large
enough to maintain adequate log switch information to resolve
archivelog gaps.
------------------------------------------------------------
---tstdb1_stdby1: 查詢v$archived_log,發現seq#97~99各有兩條記錄,一條是APPLIED=YES,一條是APPLIED=NO
SQL> select sequence#,name,fal,creator,registrar,completion_time,applied from v$archived_log where sequence#>=93 and RESETLOGS_CHANGE#=(select RESETLOGS_CHANGE# from v$database_incarnation where status='CURRENT') order by sequence#;
SEQUENCE# NAME FAL CREATOR REGISTR COMPLETION_TIME APPLIED
---------- ------------------------------------------------------------------------------------------ --- ------- ------- ----------------- ---------
93 /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_93_1mLXovJhM_.arc NO ARCH RFS 20150928 15:03:25 YES
94 /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_94_1mLZMUNCf_.arc NO ARCH RFS 20150928 15:31:16 YES
95 /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_95_1mLZMSt-v_.arc YES ARCH RFS 20150928 15:31:15 YES
96 /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_96_1mLZMS9c8_.arc YES ARCH RFS 20150928 15:31:15 YES
97 /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_97_1mLZMTSce_.arc NO ARCH RFS 20150928 15:31:16 NO
97 /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_97_1mLc2IJRe_.arc YES ARCH RFS 20150928 16:19:18 YES
98 /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_98_1mLc5tSbd_.arc YES ARCH RFS 20150928 16:20:18 YES
98 /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_98_1mLaMwijv_.arc NO ARCH RFS 20150928 15:49:17 NO
99 /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_99_1mLc9Sctz_.arc YES ARCH RFS 20150928 16:21:18 YES
99 /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_99_1mLaMvX29_.arc YES ARCH RFS 20150928 15:49:17 NO
100 /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_100_1mLaMutXu_.arc YES ARCH RFS 20150928 15:49:16 YES
101 /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_101_1mLaMvZmx_.arc YES ARCH RFS 20150928 15:49:17 YES
102 /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_102_1mLaMwlA9_.arc YES ARCH RFS 20150928 15:49:17 NO
103 /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_103_1mLaMwux8_.arc YES ARCH RFS 20150928 15:49:17 NO
104 /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_104_1mLaMwzpf_.arc YES ARCH RFS 20150928 15:49:17 NO
105 /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_105_1mLaN0VvY_.arc NO ARCH RFS 20150928 15:49:18 NO
106 /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_106_1mLaN9x5D_.arc NO ARCH RFS 20150928 15:49:21 NO
107 /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_107_1mLa-Hquy_.arc NO ARCH RFS 20150928 16:00:17 NO
108 /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_108_1mLa-HQ0E_.arc YES ARCH RFS 20150928 16:00:17 NO
109 /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_109_1mLa-HRGz_.arc YES ARCH RFS 20150928 16:00:17 NO
110 /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_110_1mLapYURG_.arc YES ARCH RFS 20150928 15:57:17 NO
111 /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_111_1mLapednu_.arc NO ARCH RFS 20150928 15:57:19 NO
112 /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_112_1mLapmLM__.arc NO ARCH RFS 20150928 15:57:21 NO
113 /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_113_1mLatCu7l_.arc NO ARCH RFS 20150928 15:58:19 NO
---tstdb1:將seq#102~104恢復至原來的目錄:
mv /oradata06/o1_mf_1_102_1mLZd-S_d_.arc /oradata06/fra/TSTDB1/archivelog/2015_09_28/
mv /oradata06/o1_mf_1_103_1mLZd_sEl_.arc /oradata06/fra/TSTDB1/archivelog/2015_09_28/
mv /oradata06/o1_mf_1_104_1mLZe1E7j_.arc /oradata06/fra/TSTDB1/archivelog/2015_09_28/
---tstdb1_stdby1:大約1分鐘後managed recovery繼續進行
***tstdb1_stdby1 alert.log內容:
Mon Sep 28 16:38:19 2015
RFS[1]: Allowing overwrite of partial archivelog for thread 1 sequence 102
RFS[1]: Opened log for thread 1 sequence 102 dbid 2051793563 branch 891526089
Archived Log entry 329 added for thread 1 sequence 102 rlc 891526089 ID 0x7ab78c1e dest 2:
Mon Sep 28 16:38:20 2015
Media Recovery Log /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_102_1mLd6IGHB_.arc
Media Recovery Log /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_103_1mLaMwux8_.arc
Error opening /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_103_1mLaMwux8_.arc
Attempting refetch
Media Recovery Waiting for thread 1 sequence 103
Fetching gap sequence in thread 1, gap sequence 103-103
FAL[client]: Error fetching gap sequence, no FAL server specified
Mon Sep 28 16:38:30 2015
FAL[client]: Error fetching gap sequence, no FAL server specified
Mon Sep 28 16:38:40 2015
FAL[client]: Error fetching gap sequence, no FAL server specified
Mon Sep 28 16:38:50 2015
FAL[client]: Error fetching gap sequence, no FAL server specified
Mon Sep 28 16:39:00 2015
FAL[client]: Error fetching gap sequence, no FAL server specified
Mon Sep 28 16:39:10 2015
FAL[client]: Error fetching gap sequence, no FAL server specified
Mon Sep 28 16:39:19 2015
RFS[2]: Allowing overwrite of partial archivelog for thread 1 sequence 103
RFS[2]: Opened log for thread 1 sequence 103 dbid 2051793563 branch 891526089
Archived Log entry 330 added for thread 1 sequence 103 rlc 891526089 ID 0x7ab78c1e dest 2:
Mon Sep 28 16:39:20 2015
Media Recovery Log /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_103_1mLd9tMuw_.arc
Media Recovery Log /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_104_1mLaMwzpf_.arc
Error opening /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_104_1mLaMwzpf_.arc
Attempting refetch
Media Recovery Waiting for thread 1 sequence 104
Fetching gap sequence in thread 1, gap sequence 104-104
FAL[client]: Error fetching gap sequence, no FAL server specified
Mon Sep 28 16:39:30 2015
FAL[client]: Error fetching gap sequence, no FAL server specified
Mon Sep 28 16:39:40 2015
FAL[client]: Error fetching gap sequence, no FAL server specified
Mon Sep 28 16:39:50 2015
FAL[client]: Error fetching gap sequence, no FAL server specified
Mon Sep 28 16:40:00 2015
FAL[client]: Error fetching gap sequence, no FAL server specified
Mon Sep 28 16:40:10 2015
FAL[client]: Error fetching gap sequence, no FAL server specified
Mon Sep 28 16:40:19 2015
RFS[2]: Allowing overwrite of partial archivelog for thread 1 sequence 104
RFS[2]: Opened log for thread 1 sequence 104 dbid 2051793563 branch 891526089
Archived Log entry 331 added for thread 1 sequence 104 rlc 891526089 ID 0x7ab78c1e dest 2:
Media Recovery Log /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_104_1mLdDSSBQ_.arc
Media Recovery Log /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_105_1mLaN0VvY_.arc
Media Recovery Log /oradata06/teststdby/fra/TSTDB1_STDBY1/archivelog/2015_09_28/o1_mf_1_106_1mLaN9x5D_.arc
從上述過程可以看出在managed recovery的過程中,如果出現了archivelog gap,理論上需要依靠fal_server、fal_client的設定從primary上fetch missing archivelog。但我們測試中發現不設定fal_server、fal_client也能將缺失的archivelog從primary側get過來,但是每fetch一個archivelog會有1分鐘的時間浪費在檢測fal_server階段;因此在實際應用時還是建議設定好fal_server,fal_client,在11.2以上版本中fal_client可以不設定,因為fal_client的值可以從fal_server的log_archive_dest_n引數裡自動獲取
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/53956/viewspace-1810980/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- dataguard 主備庫出現gap
- dataguard備庫出現GAP修復
- Delete Dataguard ArchivelogdeleteHive
- 運維場景下的兩個自我運維
- Cordova 環境搭建(PhoneGap前身)
- RAC環境下dataguard的搭建
- DATAGUARD實際的應用場景
- VS Code 終端出現兩個 conda 環境名
- 【Dataguard】Oracle多租戶環境對Dataguard的影響Oracle
- DataGuard環境程式資訊追蹤
- dataguard環境中的密碼維護密碼
- 搭建rac+DataGuard的測試環境
- window環境下安裝和切換兩個python環境Python
- 函式索引的兩個應用場景示例(下)函式索引
- 前端兩種路由實現和使用場景前端路由
- oracle dataguard的兩個新特點。Oracle
- Mac下安裝Phonegap開發環境Mac開發環境
- 【DG】 DataGuard 中處理archive gap的方法Hive
- oracle裡面的幾個環境變數表Oracle變數
- rxjs 裡 Skip 操作符的一個使用場景JS
- Docker 的應用場景在哪裡Docker
- 【Redis場景4】單機環境下秒殺問題Redis
- 基於多種場景DataGuard切換方案
- DATAGUARD中手工處理日誌GAP
- 人工智慧在各個領域裡的應用場景人工智慧
- 全面解析 | 鑰匙環服務的應用場景&商業價值
- 海量資料場景面試題:出現頻率最高的 100 個詞面試題
- Oracle Dataguard Standby Redo Log的兩個實驗Oracle
- 搭建測試環境後出現的問題
- Data Guard維護管理三之處理archivelog gapHive
- RAC+Dataguard環境中JDBC Failover配置JDBCAI
- ORACLE RAC資料庫配置Dataguard環境(3)Oracle資料庫
- ORACLE RAC資料庫配置Dataguard環境(2)Oracle資料庫
- ORACLE RAC資料庫配置Dataguard環境(1)Oracle資料庫
- 在DATAGUARD中手工處理日誌GAP的方法
- rxjs 裡 CombineLatest 操作符的一個使用場景JS
- AVC:2015年中國家電市場環境解析
- 如何使用HBase?大資料儲存的兩個實戰場景大資料