Orcle 12c DG 新特性---ADG默认实时应用

1 说明

In previous releases, when creating a Data Guard configuration using the SQL command line, the default configuration was to apply redo from archived log files on the standby database. In Oracle Database 12c Release 1 (12.1), the default configuration is to use real-time apply so that redo is applied directly from the standby redo log file.

在之前版本中启用MRP默认是从归档日志文件中应用redo日志。从12c开始,默认是通过读取standby redo日志文件来启用real-time redo应用。

Recovery time is shortened at failover given that there is no backlog of redo waiting to be applied to the standby database if a failover is required. An active Data Guard user also sees more current data. This enhancement eliminates additional manual configuration (and the requirement that the administrator be aware of the default setting) that was required in past releases. It also makes the default SQL*Plus configuration identical to the default configuration used by the Data Guard broker.

2 实验

2.1 主备库状态

–主库

SQL> select protection_mode,database_role,protection_level,open_mode from v$database;
PROTECTION_MODE      DATABASE_ROLE    PROTECTION_LEVEL	   OPEN_MODE
-------------------- ---------------- -------------------- --------------------
MAXIMUM AVAILABILITY PRIMARY	      MAXIMUM AVAILABILITY READ WRITE

–备库

SQL> select protection_mode,database_role,protection_level,open_mode from v$database;
PROTECTION_MODE      DATABASE_ROLE    PROTECTION_LEVEL	   OPEN_MODE
-------------------- ---------------- -------------------- --------------------
MAXIMUM AVAILABILITY PHYSICAL STANDBY MAXIMUM AVAILABILITY READ ONLY WITH APPLY

2.2 启用MRP

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT;

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING ARCHIVED LOGFILE DISCONNECT;

在备库配置了standby redo log,并处于归档模式,那么默认情况下会上面语句会自动启用real-time redo应用。

2.3 主库创建表

SQL> create table cndba as select * from dba_users;
Table created.
 
SQL> select count(*) from cndba;
COUNT(*)
----------
36

注意:不要切换日志,看看备库是否实时同步。

2.4 备库查询数据

SQL> select count(*) from cndba;
  COUNT(*)
----------
36

数据同步过来了。所以Real-Time应用是默认设置。

你可能感兴趣的:(Oracle,12c,DG)