In some situations, a business cannot afford to lose data regardless of the
circumstances. In other situations, the availability of the database may be more
important than any potential data loss in the unlikely event of a multiple failure.
Finally, some applications require maximum database performance at all times, and
can therefore tolerate a small amount of data loss if any component should fail. The
following descriptions summarize the three distinct modes of data protection.
在一些情形下,一些业务不能忍受数据的丢失,一些业务对数据库的可用性要求比较高,一些业务则可以忍受小数据量的丢失,以下三种情况可以满足三种不同的模式:
Maximum availability
This protection mode provides the highest level of data
protection that is possible without compromising the availability of a primary
database. Transactions do not commit until all redo data needed to recover those
transactions has been written to the online redo log and to the standby redo log on at
least one synchronized standby database. If the primary database cannot write its redo
stream to at least one synchronized standby database, it operates as if it were in
maximum performance mode to preserve primary database availability until it is
again able to write its redo stream to a synchronized standby database.
This protection mode ensures zero data loss except in the case of certain double faults,
such as failure of a primary database after failure of the standby database.
最大可用,介于最大保护和最大性能之间,如果redo可以传输,则会等到至少一个同步的备库实现日志已经写入redo log才会commit,如果实现不了redo的传输则主库则会持续可用。
这种保护模式能够确保数据0丢失,除了遇到两个错误,例如备库down机后,主库也down机了
Maximum performance
This is the default protection mode. It provides the highest
level of data protection that is possible without affecting the performance of a primary
database. This is accomplished by allowing transactions to commit as soon as all redo
data generated by those transactions has been written to the online log. Redo data is
also written to one or more standby databases, but this is done asynchronously with
respect to transaction commitment, so primary database performance is unaffected by
delays in writing redo data to the standby database(s).
This protection mode offers slightly less data protection than maximum availability
mode and has minimal impact on primary database performance.
这种保护模式属于异步传输,即主库不考虑备库的是否已应用日志的影响
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 a transaction must be written to both the online redo log and to the standby
redo log on at least one synchronized standby database before the transaction
commits. To ensure that data loss cannot occur, the primary database will shut down,
rather than continue processing transactions, if it cannot write its redo stream to at
least one synchronized standby database.
All three protection modes require that specific redo transport options be used to send
redo data to at least one standby database.
最大保护
这种方式不会出现数据的丢失,主库会在redo stream失败的同时shutdown主库,并且会同时只有当redo log buffer的信息都写入到了主库和至少一个备库的redo log中才会提交事务
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/29802484/viewspace-2063792/
,如需转载,请注明出处,否则将追究法律责任。