Oracle Dataguard提供了三种数据保护模式,在此分别总结一下三种数据保护模式的特点。
1.最大保护模式
1)这种模式提供了最高级别的数据保护能力;
2)要求至少一个物理备库收到重做日志后,主库的事务才能够提交;
3)主库找不到合适的备库写入时,主库会自动关闭,防止未受保护的数据出现;
4)优点:该模式可以保证备库没有数据丢失;
5)缺点:主库的自动关闭会影响到主库的可用性,同时需要备库恢复后才能提交,对网络等客观条件要求非常的高,主库的性能会因此受到非常大的冲击。
2.最大可用性模式
1)该模式提供了仅次于“最大保护模式”的数据保护能力;
2)要求至少一个物理备库收到重做日志后,主库的事务才能够提交;
3)主库找不到合适的备库写入时,主库不会关闭,而是临时降低到“最大性能模式”模式,直到问题得到处理;
4)优点:该模式可以在没有问题出现的情况下,保证备库没有数据丢失,是一种折中的方法;
5)缺点:在正常运行的过程中缺点是主库的性能受到诸多因素的影响。
3.最大性能模式
1)该模式是默认模式,可以保证主数据库的最高可用性;
2)保证主库运行过程中不受备库的影响,主库事务正常提交,不因备库的任何问题影响到主库的运行;
4)优点:避免了备库对主数据库的性能和可用性影响;
5)缺点:如果与主库提交的事务相关的恢复数据没有发送到备库,这些事务数据将被丢失,不能保证数据无损失;
4.oracle官方文档中关于以上三种模式的描述
http://download.oracle.com/docs/cd/B19306_01/server.102/b14239/log_transport.htm#sthref553
内容引用在此,供参考。
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.小结
在部署Oracle Dataguard时,需要充分考虑三种保护模式下对数据和性能的影响,以便趋利避害。具体环境具体分析,每一种数据保护模式都有其应用场合。默认的最大性能模式较常见,运行在该模式下的系统需要时刻注意备库是否有日志丢失,通常可以考虑“一主带多备”(一套主库对应多个备库)的方法来保证日志的完整性。
Good luck.
secooler
10.10.12
-- The End --
分享标题:【DataGuard】OracleDataguard三种保护模式特点总结
浏览路径:
http://cdweb.net/article/jcoeop.html