dataguard三种保护模式

data guard有三种模式,max performance、max availability、max protection这三种模式

[@more@]

.4 Data Guard Protection Modes

In some situations, a business cannot afford to lose data. In other situations, the availability of the database may be more important than the loss of data. Some applications require maximum database performance and can tolerate some small amount of data loss. The following descriptions summarize the three distinct modes of data protection.

Maximum protection 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 the standby redo log of at least one transactionally consistent standby database.

Maximum availability 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 the standby redo log of at least one transactionally consistent standby database. 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.

Maximum performance 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 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 protection and maximum availability modes require that standby redo log files are configured on at least one standby database in the configuration. All three protection modes require that specific log transport attributes be specified on the LOG_ARCHIVE_DEST_n initialization parameter to send redo data to at least one standby database. See Section 5.6 for complete information about the data protection modes.

在一些情况下,业务不允许丢失数据。在另外一些情况下,数据库的可用性比丢失数据
更为重要。一些应用需要最强的数据库性能并且能容忍丢失少量的数据。下面的描述概述了
三种不同的数据保护模式。
最大保护 这种保护模式确保如果主数据库故障不会发生数据丢失。要提供这种级别的
保护,恢复每个事务所需的重做数据必须在事务提交之前同时写到本地联机重做日志和至少
一个备数据库上的备重做日志。要确保不发生数据丢失,如果故障导致主数据库无法写重做
流到至少一个事务一致性备数据库的备重做日志时,主数据库会关闭。
最大可用性 这种保护模式提供了可能的最高级别的数据保护,而不用与主数据库的可
用性相折衷。与最大保护模式相同,在恢复事务所需的重做写到本地联机重做日志和至少一
个事务一致性备数据库上的备重做日志之前,事务将不会提交。与最大保护模式不同的是,
如果故障导致主数据库无法写重做流到异地备重做日志时,主数据库不会关闭。替代地,主
数据库以最大性能模式运行直到故障消除,并且解决所有重做日志文件中的中断。当所有中
断解决之后,主数据库自动继续以最大可用性模式运行。
这种模式确保如果主数据库故障,但是只有当第二次故障没有阻止完整的重做数据集从
主数据库发送到至少一个备数据库时,不发生数据丢失。
最大性能 这种保护模式(默认)提供了可能的最高级别的数据保护,而不影响主数据
库的性能。这是通过允许事务在恢复该事务所需重做数据在写到本地联机重做日志后立即提
交而实现的。主数据库的重做数据流也写到至少一个备数据库,但是那个重做流相对于创建
重做数据的事务是异步写的。
当所用的网络连接有足够的带宽,这种模式提供了近似于最大可用性模式的数据保护级
别,并且对主数据库性能的影响最小。
最大保护和最大可用性模式需要备重做日志文件配置在配置中的至少一个备数据库上。
所有三种保护模式需要在LOG_ARCHIVE_DEST_n 初始化参数上指定特定的日志传输属性
以发送重做数据到至少一个备数据库。查看5.6 节以获得数据保护模式的完整信息。

最大保护:比如说用户commit,此时候会刷新redo buffer写入redolog中。在此模式时候,必须要保证redo buffer信息写入redo log和备机的一个redo中。不然就数据库挂。貌似这样。没测试过。有空测试下。

max protection的定义是事务提交的前提是redo data必须写入本地online log及至少一个standby log,如果没有满足这个条件,则该事务不能提交,数据库会自动down掉
max available模式的定义是事务提交的前提是redo data必须写入本地online log及至少一个standby log,如果没有满足这个条件,则该事务不能提交,但是数据库不会自动down掉。数据库会降格为max performance模式,只有当所有的redo data传递到standby logfile后,这个数据库才会自动升格为max availabity模式
max performance模式的定义是在不影响主数据库的性能的情况下最大限度的保护数据的安全。redo data在写入online log之后,事务就可以提交。所以前两种模式在主数据库和备用数据库之前的网络断掉之后,都会影响主数据库的可用性,但是max performance模式,在网络断掉之后,不会影响主数据库的可用性
max protection模式和max availability模式的要求是在data guard环境中至少有一个standby数据库的log_archive_dest_n设置为sync lgwr affirm模式
data guard模式所处的模式可以在v$database数据库查询到
数据传递过来只会备份到一个地方,因为是从网络过来的数据,网络的那边还需要得到确认-----摘录itput.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/9925929/viewspace-977459/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/9925929/viewspace-977459/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值