日期:2014-05-16  浏览次数:20497 次

验证DG最大性能模式下使用ARCH/LGWR及STANDBY LOG的不同情况
总结:  --两台单实例数据库做DG,数据库版本10.2.0.1.0
1.主库配置为:arch async,备库无STANDBY LOG。
日志中会有:RFS[4]: No standby redo logfiles created
2.主库配置为:arch async,备库有STANDBY LOG,日志中未显示使用。
特殊情况:主库配置为:arch async,备库有STANDBY LOG,备库未打开日志应用 ,日志中有:RFS[8]: Successfully opened standby log 4: '/u01/app/oracle/prod/disk1/standbylog1.log'
3.主库修改参数为:lgwr async,备库有STANDBY LOG,日志如下:

RFS[10]: Successfully opened standby log 4: '/u01/app/oracle/prod/disk1/standbylog1.log'

4.主库修改参数为:log_archive_dest_2   == SERVICE=PROD,只写SERVICE=PROD主库归档不能传送到备库。

实验1:主库配置为:arch async,备库无STANDBY LOG。

1.主库配置及日志:
主库:
SQL> select protection_mode,database_role,protection_level from v$database;
PROTECTION_MODE      DATABASE_ROLE    PROTECTION_LEVEL
-------------------- ---------------- --------------------
MAXIMUM PERFORMANCE  PRIMARY          MAXIMUM PERFORMANCE
15:47:43 SQL> show parameter log_archive_dest_2
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_2                   string      SERVICE=prod1 arch async  VALI
                                                 D_FOR=(ONLINE_LOGFILES,PRIMARY
                                                 _ROLE) DB_UNIQUE_NAME=prod1
15:47:49 SQL> select max(sequence#) from v$archived_log;
MAX(SEQUENCE#)
--------------
            27
备库:
SQL> select protection_mode,database_role,protection_level from v$database;
PROTECTION_MODE      DATABASE_ROLE    PROTECTION_LEVEL
-------------------- ---------------- --------------------
MAXIMUM PERFORMANCE  PHYSICAL STANDBY MAXIMUM PERFORMANCE

03:48:02 SQL> select group#,thread#,bytes/1024/1024 mb,status from v$standby_log;
no rows selected

03:48:05 SQL> select max(sequence#) from v$archived_log;
MAX(SEQUENCE#)
--------------
            27
####################
2.主库做REDO日志切换并查看日志:
15:48:18 SQL> alter system switch logfile;
System altered.
15:49:33 SQL> alter system switch logfile;
System altered.
15:50:11 SQL> select max(sequence#) from v$archived_log;
MAX(SEQUENCE#)
--------------
            29
备库已经接收:
03:49:48 SQL> select max(sequence#) from v$archived_log;
MAX(SEQUENCE#)
--------------
 &