Data Guard 提供三种数据保护模式:最大保护(Maximum Protection),最大可用(Maximum Availability)和 最大性能(Maximum Performance)。
最高可用模式(Maximum Availability)能提供非常高级别的数据保护。在这种模式下,只有当所有的redo日志备写入至少一个standby database时,事物才能提交。
当主库不能将redo日志写入至少一个standby database时,那么DG就相当于在最大性能(maximum performance)模式工作。
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 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.


主库 Primary database:绿色
物理备库 Physical standby database:黄色

alter system set log_archive_dest_state_2=defer;
show parameter log_archive_dest_stat_2
主库查看发现,protection_mode仍然是最高可用模式,但当前protection_level显示resynchronization
即保护模式的目标没变,当前状态变了,需要同步。此时相当于 【最大性能模式】
select database_role,protection_mode,protection_level from v$database;



主库开启远程归档,查看保护模式,protection_level已经变成 maximum availability 最高可用模式
alter system set log_archive_dest_stat_2=enable;
select database_role,protection_mode,protection_level from v$database;




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