- 最后登录
- 2013-10-16
- 在线时间
- 58 小时
- 威望
- 94
- 金钱
- 731
- 注册时间
- 2012-4-11
- 阅读权限
- 50
- 帖子
- 71
- 精华
- 1
- 积分
- 94
- UID
- 341
|
1#
发表于 2012-12-14 16:26:45
|
查看: 5439 |
回复: 7
本帖最后由 lixz_2008 于 2012-12-14 16:30 编辑
测试环境:
primary database:11.2.0.3 rac+asm
standby database:11.20.3 single node+filesystem
dataguard的保护模式:MAXIMUM PERFORMANCE
重做日志传输模式:LGWR ASYNC
应用方法:redo apply
我的疑问是:11G对重做日志传输功能加强了,使用LNS进程直接读取SGA的redo buffer然后发从给备份库的RFS进程,我的问题是LGWR是3秒写一次ORL或者redo buffer超过3分之1,那么LNS是如何读取重做日志缓冲区的条目的?频率是怎样的?
我做了些测试如下:
主库上创建一张表:- SQL> create table test(num number,name varchar2(10));
- Table created.
- SQL> insert into test values(1,'lucy');
- 1 row created.
- SQL> insert into test values(2,'lily');
- 1 row created.
- SQL> commit;
- Commit complet
复制代码 过了很长时间,但是备库上并没有查到这个表:
- SQL> select * from test;
- select * from test
- *
- ERROR at line 1:
- ORA-00942: table or view does not exist
复制代码 查看备库的standby log状态:- SQL> select status ,first_change#, next_change# from v$standby_log;
- STATUS FIRST_CHANGE# NEXT_CHANGE#
- ---------- ------------- ------------
- ACTIVE 10993846 11077746
- UNASSIGNED
- UNASSIGNED
- UNASSIGNED
- ACTIVE 11062159 11077747
- UNASSIGNED
复制代码 从主库的alert日志上看:LNS: Standby redo logfile selected for thread 1 sequence 43 for destination LOG_ARCHIVE_DEST_2- SQL> select process,status,thread#,sequence#,client_pid from v$managed_standby;
- PROCESS STATUS THREAD# SEQUENCE# CLIENT_PID
- --------- ------------ ---------- ---------- ----------------------------------------
- ARCH CLOSING 1 41 2082
- LNS WRITING 1 43 2092
- ARCH CLOSING 1 42 2084
- ARCH CLOSING 1 14 2086
- ARCH CLOSING 1 40 2088
复制代码 LNS在等待日志sequence 43,手工切换日志:- SQL> alter system switch logfile;
- System altered.
- SQL> alter system switch logfile;
- System altered.
- SQL> alter system switch logfile;
- System altered.
复制代码 此时备库收到了主库的日志,能查询表test;- SQL> select * from test;
- NUM NAME
- ---------- ----------
- 1 lucy
- 2 lily
复制代码 从测试上看,LNS并不是实时的去读取重做日志缓冲区,求大神指点!谢谢! |
|