在Dataguard的备库上应用日志的时候,通常有两个语句,但是这两个语句是有区别的,一个是实时应用,一个是非实时应用。
alter database recover managed standby database disconnect from session;
alter database recover managed standby database using current logfile disconnect;
测试
--在备库上启用实时应用日志,并创建表
alter database recover managed standby database using current logfile disconnect;
--在主库上创建表
19:23:46 SYS@test>create table zbb.t3(id number);
Table created.
--在备库上查看表,立刻生效
ZBB@test_stdby>set time on
19:24:02 ZBB@test_stdby>desc t3
Name Null? Type
----------------------------------------- -------- ----------------------------
ID NUMBER