DG的保護模式

zhangsharp20發表於2016-03-25
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部落格 ” ,連結:http://blog.itpub.net/29802484/viewspace-2063792/,如需轉載,請註明出處,否則將追究法律責任。

相關文章