在Dataguard的備庫上應(yīng)用日志的時候,通常有兩個語句,但是這兩個語句是有區(qū)別的,一個是實(shí)時應(yīng)用,一個是非實(shí)時應(yīng)用。
alter database recover managed standby database disconnect from session;
alter database recover managed standby database using current logfile disconnect;
測試?
--在備庫上啟用實(shí)時應(yīng)用日志,并創(chuàng)建表?
alter database recover managed standby database using current logfile disconnect;?
--在主庫上創(chuàng)建表
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