Archived Redo Logs歸檔重做日誌介紹及其優點

neverinit發表於2018-12-17

Redo Log File Use in ARCHIVELOG Mode

什麼是Archived Redo Logs?

Oracle Database lets you save filled groups of redo log files to one or more offline destinations, known collectively as the archived redo log.

1.將寫滿的重做日誌儲存到1個或多個離線的目錄,統稱為歸檔重做日誌。


The process of turning redo log files into archived redo log files is called archiving.

2.將重做日誌檔案轉換為歸檔重做日誌檔案的過程稱為歸檔。


This process is only possible if the database is running in ARCHIVELOG mode.

3.資料庫只在ARCHIVELOG模式下執行歸檔操作。


You can choose automatic or manual archiving.

4.可以選擇自動或手動歸檔。


An archived redo log file is a copy of one of the filled members of a redo log group.

5.歸檔重做日誌是一組寫滿的重做日誌中某一個的副本。


It includes the redo entries and the unique log sequence number of the identical member of the redo log group.

6.歸檔重做日誌包括重做條目和重做日誌組相同成員的唯一日誌序列號。


The archived redo log contains a copy of every group created since you enabled archiving.

7.歸檔重做日誌包含自您啟用歸檔後建立的每個重做日誌組的副本。


When the database is running in ARCHIVELOG mode, the log writer process (LGWR) cannot reuse and hence overwrite a redo log group until it has been archived.

8.如果資料庫執行在ARCHIVELOG模式下,在重做日誌完成歸檔操作之前,LGWR程式不能重用和覆蓋重做日誌。


The background process ARCn automates archiving operations when automatic archiving is enabled.

9.後臺程式ARCn在啟用自動歸檔時自動執行歸檔操作。


The database starts multiple archiver processes as needed to ensure that the archiving of filled redo logs does not fall behind.

10.資料庫根據需要啟動多個歸檔程式,以保證歸檔的速度。


歸檔重做日誌可以做什麼?

Recover a database

1.恢復資料庫


Update a standby database

2.更新備用資料庫


Get information about the history of a database using the LogMiner utility

3.使用LogMiner獲取資料庫歷史資訊

為什麼選擇歸檔模式?

If a media failure occurs while the database is in NOARCHIVELOG mode, you can only restore the database to the point of the most recent full database backup. You cannot recover transactions subsequent to that backup.

非歸檔模式下,如果發生介質故障,如果沒有最近的資料全量備份,那麼資料丟失就不可避免。即使有最近的資料全量備份,也會大概率丟失部分資料。

歸檔日誌的優點

A database backup, together with online and archived redo log files, guarantees that you can recover all committed transactions in the event of an operating system or disk failure.

1.可以確保在系統或硬碟故障情況下恢復資料。


If you keep archived logs available, you can use a backup taken while the database is open and in normal system use.

2.如果保留了可用的歸檔日誌,可以在不影響資料庫正常執行的情況下進行備份操作。


You can keep a standby database current with its original database by continuously applying the original archived redo logs to the standby.

3.將歸檔重做日誌連續應用到備庫,可以保證主備庫資料一致。


You can configure an instance to archive filled redo log files automatically, or you can archive manually. For convenience and efficiency, automatic archiving is usually best. 

4.可以自動也可以手動歸檔,當然最好是自動歸檔。


If all databases in a distributed database operate in ARCHIVELOG mode, you can perform coordinated distributed database recovery. However, if any database in a distributed database is in NOARCHIVELOG mode, recovery of a global distributed database (to make all databases consistent) is limited by the last full backup of any database operating in NOARCHIVELOG mode.

5.如果分散式資料庫中的所有節點都以ARCHIVELOG模式執行,則可以執行協調的分散式資料庫恢復。


提示:將歸檔的重做日誌檔案和相應的資料庫備份從本地磁碟移動到永久離線儲存介質(如磁帶)是一種很好的做法。即使發生地震、洪水等不可抗拒自然災害,也能確保資料的安全。當然,異地災備、兩地三中心等技術架構也能防止自然災害的威脅。

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

相關文章