溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

【DataGuard】Oracle Dataguard三種保護模式特點總結(jié)

發(fā)布時間:2020-08-16 20:50:58 來源:ITPUB博客 閱讀:207 作者:TaihangMeng 欄目:建站服務(wù)器
Oracle Dataguard提供了三種數(shù)據(jù)保護模式,在此分別總結(jié)一下三種數(shù)據(jù)保護模式的特點。

1.最大保護模式
1)這種模式提供了最高級別的數(shù)據(jù)保護能力;
2)要求至少一個物理備庫收到重做日志后,主庫的事務(wù)才能夠提交;
3)主庫找不到合適的備庫寫入時,主庫會自動關(guān)閉,防止未受保護的數(shù)據(jù)出現(xiàn);
4)優(yōu)點:該模式可以保證備庫沒有數(shù)據(jù)丟失;
5)缺點:主庫的自動關(guān)閉會影響到主庫的可用性,同時需要備庫恢復(fù)后才能提交,對網(wǎng)絡(luò)等客觀條件要求非常的高,主庫的性能會因此受到非常大的沖擊。

2.最大可用性模式
1)該模式提供了僅次于“最大保護模式”的數(shù)據(jù)保護能力;
2)要求至少一個物理備庫收到重做日志后,主庫的事務(wù)才能夠提交;
3)主庫找不到合適的備庫寫入時,主庫不會關(guān)閉,而是臨時降低到“最大性能模式”模式,直到問題得到處理;
4)優(yōu)點:該模式可以在沒有問題出現(xiàn)的情況下,保證備庫沒有數(shù)據(jù)丟失,是一種折中的方法;
5)缺點:在正常運行的過程中缺點是主庫的性能受到諸多因素的影響。

3.最大性能模式
1)該模式是默認模式,可以保證主數(shù)據(jù)庫的最高可用性;
2)保證主庫運行過程中不受備庫的影響,主庫事務(wù)正常提交,不因備庫的任何問題影響到主庫的運行;
4)優(yōu)點:避免了備庫對主數(shù)據(jù)庫的性能和可用性影響;
5)缺點:如果與主庫提交的事務(wù)相關(guān)的恢復(fù)數(shù)據(jù)沒有發(fā)送到備庫,這些事務(wù)數(shù)據(jù)將被丟失,不能保證數(shù)據(jù)無損失;


4.oracle官方文檔中關(guān)于以上三種模式的描述
http://download.oracle.com/docs/cd/B19306_01/server.102/b14239/log_transport.htm#sthref553
內(nèi)容引用在此,供參考。
5.6.1.1  Maximum Protection Mode

This protection mode ensures that no data loss will occur if the primary database fails. To provide this level of protection, the redo data needed to recover each transaction must be written to both the local online redo log and to the standby redo log on at least one standby database before the transaction commits. To ensure data loss cannot occur, the primary database shuts down if a fault prevents it from writing its redo stream to at least one remote standby redo log. For multiple-instance RAC databases, Data Guard shuts down the primary database if it is unable to write the redo records to at least one properly configured database instance. The maximum protection mode requires that at least one standby instance has a standby redo log and the LGWR, SYNC, and AFFIRM attributes be used on the LOG_ARCHIVE_DEST_n parameter for this destination.
5.6.1.2 Maximum Availability Mode

This protection mode provides the highest level of data protection that is possible without compromising the availability of the primary database. Like maximum protection mode, a transaction will not commit until the redo needed to recover that transaction is written to the local online redo log and to at least one remote standby redo log. Unlike maximum protection mode, the primary database does not shut down if a fault prevents it from writing its redo stream to a remote standby redo log. Instead, the primary database operates in maximum performance mode until the fault is corrected and all gaps in redo log files are resolved. When all gaps are resolved, the primary database automatically resumes operating in maximum availability mode.

This mode ensures that no data loss will occur if the primary database fails, but only if a second fault does not prevent a complete set of redo data from being sent from the primary database to at least one standby database.

Like maximum protection mode, the maximum availability mode requires that you:

    * Configure standby redo log files on at least one standby database.
    * Set the SYNC, LGWR, and AFFIRM attributes of the LOG_ARCHIVE_DEST_n parameter for at least 1 standby database.

5.6.1.3 Maximum Performance Mode

This protection mode (the default) provides the highest level of data protection that is possible without affecting the performance of the primary database. This is accomplished by allowing a transaction to commit as soon as the redo data needed to recover that transaction is written to the local online redo log. The primary database's redo data stream is also written to at least one standby database, but that redo stream is written asynchronously with respect to the commitment of the transactions that create the redo data.

When network links with sufficient bandwidth are used, this mode provides a level of data protection that approaches that of maximum availability mode with minimal impact on primary database performance.

The maximum performance mode enables you to either set the LGWR and ASYNC attributes, or set the ARCH attribute on the LOG_ARCHIVE_DEST_n parameter for the standby database destination. If the primary database fails, you can reduce the amount of data that is not received on the standby destination by setting the LGWR and ASYNC attributes.

5.小結(jié)
在部署Oracle Dataguard時,需要充分考慮三種保護模式下對數(shù)據(jù)和性能的影響,以便趨利避害。具體環(huán)境具體分析,每一種數(shù)據(jù)保護模式都有其應(yīng)用場合。默認的最大性能模式較常見,運行在該模式下的系統(tǒng)需要時刻注意備庫是否有日志丟失,通??梢钥紤]“一主帶多備”(一套主庫對應(yīng)多個備庫)的方法來保證日志的完整性。

Good luck.

secooler
10.10.12

-- The End --

向AI問一下細節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI