测试一下11gr2的active dataguard
首先与原来10g一样,standby 跟上主库的归档,
Media Recovery Waiting for thread 1 sequence 278 (in transit)
然后在standby以只读打开后,启动日志恢复。
SQL> recover managed standby database cancel;
Media recovery complete.
SQL> alter database open read only;
Database altered.
SQL> recover managed standby database disconnect using current logfile;
Media recovery complete.
主库创建一个表
SQL> create table t as select * from adult;
Table created.
SQL> select * from t;
USERNAME USERPWD
------------------------------ ------------------------------
laogao3232 321456
hello world
tiany 22596
马上到备库查,不需要switch logfile:
SQL> select * from t;
USERNAME USERPWD
------------------------------ ------------------------------
laogao3232 321456
hello world
tiany 22596
主库delete一行
SQL> delete from t where username='tiany';
1 row deleted.
到备库查:
SQL> select * from t;
USERNAME USERPWD
------------------------------ ------------------------------
laogao3232 321456
hello world
tiany 22596
主库commit后,在备库查
SQL> select * from t;
USERNAME USERPWD
------------------------------ ------------------------------
laogao3232 321456
hello world
从这里看,小事务时主备基本上是实时的,压力大的时候可以测试一下,可能会有所延迟。
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/668365/viewspace-1029421/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/668365/viewspace-1029421/