1 说明
Data Guard maximum availability supports the use of the NOAFFIRM redo transport attribute. A standby database returns receipt acknowledgment to its primary database as soon as redo is received in memory. The standby database does not wait for the Remote File Server (RFS) to write to a standby redo log file.
DG最大可用支持NOAFFIRM redo传输属性,备库只要接收的redo存到内存中时,就会向主库返回接收确认。就不需要RFS进程写入到redo log文件中了。

This feature provides increased primary database performance in Data Guard configurations using maximum availability and SYNC redo transport. Fast Sync isolates the primary database in a maximum availability configuration from any performance impact due to slow I/O at a standby database.

Fast Sync会使处于最大可用的主库不会受到备库上的I/O的影响。不需要牺牲太大的性能来提升数据的安全性。这个特性引入,正常情况是足以满足需求了。除非特殊的灾难情况才会造成数据丢失,例如:主库故障后,传输的数据在备库的内存中,还没来得及写入日志文件中,备库也被重启了或者断电了,就会造成数据的丢失(数据不一致)。

关于最大可用,参考官方文档:​​http://docs.oracle.com/database/121/SBYDB/protection.htm#SBYDB4743​

When a transport is performed using SYNC/NOAFFIRM, the primary performs write operations and waits only for acknowledgement that the data has been received on the standby, not that it has been written to disk. The SYNC/NOAFFIRM transport can provide a performance benefit at the expense of potential exposure to data loss in a special case of multiple simultaneous failures.

用丢失数据的可能性来换性能的提升。 可根据业务和数据的情况,来自行选择。

下表,各种保护模式的Redo传输属性

Maximum Availability

Maximum Performance

Maximum Protection

AFFIRM or NOAFFIRM

NOAFFIRM

AFFIRM

SYNC

ASYNC

SYNC

DB_UNIQUE_NAME

DB_UNIQUE_NAME

DB_UNIQUE_NAME

语法:

ALTER SYSTEM SET log_archive_dest_2='SERVICE=DG SYNC NOAFFIRM VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=DG_P';

ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE AVAILABILITY;