Data Guard維護管理三之處理archivelog gap
An archive gap can occur whenever the primary database archives a log locally, but the log is not received at the standby site. Every minute, the primary database polls its standby databases to see if there are gaps in the sequence of archived redo log files.
每分鐘,prmary database都會檢測standby database看archived redo logfile是否發生開gap.
2.How Is a Gap Resolved?
Gap recovery is handled through the polling mechanism. For physical and logical standby databases, Oracle Change Data Capture, and Oracle Streams, Data Guard performs gap detection and resolution by automatically retrieving missing archived redo log files from the primary database. No extra configuration settings are required to poll the standby databases, to detect any gaps, or to resolve the gaps.
The important consideration here is that automatic gap recovery is contingent on the availability of the primary database. If the primary database is not available and you have a configuration with multiple physical standby databases, you can set up additional initialization parameters so that the Redo Apply can resolve archive gaps from another standby database
oracle會自動檢測和處理出現gap的archivelog,不需要dba手動處理,當然,前提是primary和standby狀態是avaliable,網路恢復正常。
3. Using the Fetch Archive Log (FAL) to Resolve Archive Gap
The fetch archive log (FAL) client and server resolve gaps detected in the range of archived redo log files generated at the primary database and received at the physical standby database.
-
The FAL client requests the transfer of archived redo log files automatically.-------FAL client端請求自動傳輸archived log
-
The FAL server services the FAL requests coming from the FAL client.--------------FAL server端響應來自FAL client端的請
The FAL mechanism handles the following types of archive gaps and problems:
-
When creating a physical or logical standby database, the FAL mechanism can automatically retrieve any archived redo log files generated during a hot backup of the primary database.
FAL會自動檢索primary 熱備份產生的作何arcived redo logfile -
When there are problems with archived redo log files that have already been received on the standby database, the FAL mechanism can automatically retrieve archived redo log files to resolve any of the following situations:
-
When the archived redo log file is deleted from disk before it is applied to the standby database.
-
When the archived redo log file cannot be applied because of a disk corruption.
-
When the archived redo log file is accidentally replaced by another file (for example, a text file) that is not an archived redo log file before the redo data has been applied to the standby database.
-
-
When you have multiple physical standby databases, the FAL mechanism can automatically retrieve missing archived redo log files from another physical standby database.
4.Manually Determining and Resolving Archive Gaps
In some situations, automatic gap recovery may not take place and you will need to perform gap recovery manually. For example, you will need to perform gap recovery manually if you are using logical standby databases and the primary database is not available.
手動解決archive gap
首先確認一下發生gap的redo logfile sequence號
standby上執行:
SYS@jzh>select * from v$archive_gap;
THREAD# LOW_SEQUENCE# HIGH_SEQUENCE#
---------- ------------- --------------
1 27 28
這裡顯示sequence#,27-28在standby 上丟失。
在primary上執行以下語句,檢視sequence# 27,28
SYS@jyp>select name from v$archived_log where thread#=1 and dest_id=1 and sequence# between 27 and 28;
NAME
--------------------------------------------------------------------------------
/u01/oracle/arch/1_27_867602649.arc
/u01/oracle/arch/1_28_867602649.arc
將以上兩個archivelog scp至standby並register.
SYS@jzh>alter database register logfile '/u01/oracle/arch/1_27_867602649.arc';
Database altered.
SYS@jzh>alter database register logfile '/u01/oracle/arch/1_28_867602649.arc';
Database altered.
register之後standby會自動recovery.檢視alert日誌:
alter database register logfile '/u01/oracle/arch/1_27_867602649.arc'
There are 1 logfiles specified.
ALTER DATABASE REGISTER [PHYSICAL] LOGFILE
Completed: alter database register logfile '/u01/oracle/arch/1_27_867602649.arc'
Thu Jan 01 10:04:33 2015
Media Recovery Log /u01/oracle/arch/1_27_867602649.arc
Media Recovery Waiting for thread 1 sequence 28
Fetching gap sequence in thread 1, gap sequence 28-28
Thu Jan 01 10:04:42 2015
alter database register logfile '/u01/oracle/arch/1_28_867602649.arc'
There are 1 logfiles specified.
ALTER DATABASE REGISTER [PHYSICAL] LOGFILE
Completed: alter database register logfile '/u01/oracle/arch/1_28_867602649.arc'
Thu Jan 01 10:04:43 2015
Media Recovery Log /u01/oracle/arch/1_27_867602649.arc
Media Recovery Log /u01/oracle/arch/1_28_867602649.arc
Media Recovery Waiting for thread 1 sequence 29 (in transit)
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10271187/viewspace-1386989/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- oracle 11g data guard維護Oracle
- Oracle 19C Data Guard基礎運維-05Failovers (GAP)Oracle運維AI
- 使用Broker管理Data Guard——停用、改保護模式等模式
- 需要了解的Data Guard理論知識(三)
- 6 Oracle Data Guard Protection Modes 保護模式Oracle模式
- 15 Oracle Data Guard Scenarios 保護場景OracleiOS
- DATAGUARD中手工處理日誌GAP
- OracleDG資料庫gap處理一列Oracle資料庫
- 需要了解的Data Guard理論知識(一)
- 需要了解的Data Guard理論知識(二)
- Oracle Data Guard Broker元件Oracle元件
- Oracle Data Guard簡介Oracle
- 單機搭建Data Guard
- Oracle 19C Data Guard基礎運維-02 Switchovers(物理)Oracle運維
- Oracle 19C Data Guard基礎運維-03 Failovers(物理)Oracle運維AI
- Oracle 19C Data Guard基礎運維-06 PROTECTION MODEOracle運維
- Oracle OCP(58):ARCHIVELOG 管理OracleHive
- 【DG】Data Guard搭建(physical standby)
- 1 關於 Oracle Data GuardOracle
- 2 Oracle Data Guard 安裝Oracle
- 1 Oracle Data Guard Broker 概念Oracle
- bd_ticket_guard_client_dataclient
- Oracle Data Guard和Broker概述Oracle
- Oracle 19C Data Guard基礎運維-08 DML重定向Oracle運維
- Oracle 19C Data Guard基礎運維-04 Failovers疑問?Oracle運維AI
- 使用Data Guard Broker進行Data Guard物理備用庫配置(Oracle 19c)Oracle
- 日常運維之TX鎖處理(一)運維
- 日常運維之TX鎖處理(二)運維
- Oracle 19C Data Guard基礎運維-01安裝物理standbyOracle運維
- 8 Oracle Data Guard Broker 屬性Oracle
- 9 Oracle Data Guard 故障診斷Oracle
- Bd-Ticket-Guard-Client-Data逆向client
- 維護你的請求佇列,處理token異常佇列
- 基於數字孿生智慧汙水處理三維視覺化管理系統視覺化
- 4.1.6 Oracle Restart 與 Oracle Data Guard 整合OracleREST
- 【DATAGUARD】Oracle19c Data Guard BrokerOracle
- 2 開始實用 Oracle Data GuardOracle
- 19 Oracle Data Guard 相關檢視Oracle
- PLC維護有何難處?如何實現遠端維護?