Dataguard(Standby) 後臺程式及歸檔應用瞭解

tolywang發表於2008-07-10

檢查Standby資料庫上是否歸檔有被應用:

在standby 上檢視   select process,status from v$managed_standby;       是否出現mrp程式

SQL> select process,status from v$managed_standby;

PROCESS STATUS
------- ------------
ARCH CONNECTED
ARCH CONNECTED
MRP0 WAIT_FOR_LOG
RFS RECEIVING

如果沒有MRP程式,說明沒有開啟為 recover managed standby database狀態 ; 

可以使用  alter database recover managed standby database disconnect from session ; 開standby。

MRP就是備庫的恢復程式
RFS程式接受從主庫來的日誌
沒有MRP程式,說明你的備庫沒有處於恢復狀態

-------------------------------------------------------------------------------------------------------------------------------------------  

程式:

RFS:remote file server
On the standby system, the remote file server (RFS) receives redo data over the network from the
LGWR process and writes the redo data to the standby redo log files.

LNSn:
On the primary database, the LGWR process submits the redo data to one or more network server
(LNSn) processes, which then initiate the network I/O in parallel to multiple remote destinations.

MRP: managed recovery process
The managed recovery process (MRP) applies archived redo log files to the physical standby database,
and automatically determines the optimal number of parallel recovery processes at the time it starts.
The number of parallel recovery slaves spawned is based on the number of CPUs available on the
standby server.

LSP:logical standby process
The logical standby process (LSP) uses parallel execution (Pnnn) processes to apply archived redo
log files to the logical standby database, using SQL interfaces. 

 

-------------------------------------------------------------------------------------------------------------------------------------- 

 

on primary database:
Log writer process (LGWR):把資料寫到線上日誌中
Data Guard除了以上傳統的Arch日誌傳送過程外,還可以採用聯機日誌的傳送,在備用端建議建立一組備用日誌,並保持與主資料庫備用日誌相同大小,而且最好比主資料庫的聯機日誌多一組以上。
如果LGWR傳送日誌,但是不在備用端建立備用日誌的話,聯機日誌將自動寫到備用端的歸檔日誌中。
即使是用LGWR進行日誌的傳輸,備用庫的online redo log的內容是不能馬上被應用的,必須當歸檔完成後才由MRPn程式應用到備用資料庫,所以說,恢復不是連續的,但是,傳送過程可以是連續的。
即使備用資料庫不是在歸檔的模式,所有的線上日誌還是會進行歸檔的操作,前提是ARCn程式必須開啟。

Archiver process (ARCn)
COPY線上日誌到本地或遠端。這就是歸檔日誌。
Fetch archive log (FAL) process (physical standby databases only)
FAL提供一個client/server的機制來檢測主備機上的歸檔是否有間斷。由standby上的FAL client和和primaryFAL server來實現此工作。由FAL_CLIENT FAL_SERVER引數決定primary databasestandby database
On the standby locationlog transport services使用下面的程式

Remote file server (RFS)
:用於從primary上接受歸檔檔案

ARCn process

standby使用online redo的時候,也就是maximum protection maximum availability模式下,ARCn用於歸檔。
_ On the standby location, log apply services使用下面的程式

Managed recovery process (MRP)
For physical standby databases only):用於把歸檔應用到standby database
Logical standby process (LSP)(For logical standby databases only):SQL介面把歸檔應用到logical database
_ On the primary and standby locations, the Data Guard broker使用下面程式

Data Guard broker monitor (DMON):
用於監控資料庫的狀態,管理log transport services and log apply services

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/35489/viewspace-374885/,如需轉載,請註明出處,否則將追究法律責任。

相關文章