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/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Data guard archive GAP 故障處理案例Hive
- 物理Data Guard中哪個程式處理Redo GAP
- oracle 11g data guard維護Oracle
- Oracle data guard常用維護操作命令(轉)Oracle
- Oracle 19C Data Guard基礎運維-05Failovers (GAP)Oracle運維AI
- Standby (Data guard) 常用維護命令及相關概念
- Oracle 10g Data Guard的建立與維護Oracle 10g
- DATA GUARD部署模式——DATA GUARD概念和管理模式
- Data Guard的三種保護模式(摘自官方文件)模式
- 使用Broker管理Data Guard——停用、改保護模式等模式
- 介紹ORACLE DATA GUARD——DATA GUARD概念和管理Oracle
- 10g Data Guard三種保護模式測試模式
- 需要了解的Data Guard理論知識(三)
- Data Guard Broker系列之四:資料庫管理資料庫
- [Data Guard]Oracle10g Data Guard學習筆記(三)Oracle筆記
- Oracle最高可用性架構之Data Guard管理Oracle架構
- Oracle Data Guard 理論知識Oracle
- 6 Oracle Data Guard Protection Modes 保護模式Oracle模式
- DATA GUARD概念和管理總結
- 技術白皮書:Oracle Data Guard 11gOracle Data Guard 理論知識OracleGo
- 15 Oracle Data Guard Scenarios 保護場景OracleiOS
- Data Guard 的3種資料保護模式模式
- Redo Gap 處理與優化優化
- DG發現gap處理流程
- DATA GUARD手工管理資料檔案
- SQL語句——DATA GUARD概念和管理SQL
- data guard 歸檔日誌管理 (standby)
- data guard 歸檔日誌管理 (primary)
- 管理物理STANDBY資料庫——DATA GUARD概念和管理資料庫
- oracle 10g data guard broker ORA-16607 故障處理案例Oracle 10g
- DATAGUARD中手工處理日誌GAP
- RAC 11.2.0.3 維護命令(三) SRVCTL管理services
- oracle9204(9i)_dg(data guard)_archive gap_query_apply_transmitOracleHiveAPPMIT
- Data guard搭建
- oracle data guard!!Oracle
- Oracle9iR2 Data Guard的保護模式(ZT)Oracle模式
- mysql 管理維護MySql
- 管理邏輯STANDBY資料庫——DATA GUARD概念和管理資料庫