数据迁移:DataGuard配置(三)

2014-11-24 11:43:58 · 作者: · 浏览: 3
oop;
end;
/
--强制数据库日志切换
[sql]
alter system switch logfile;
--将备库从恢复模式置于只读模式:
[sql]
alter database recover managed standby database cancel;
alter database open ;
--查询备库数据
[sql]
select rowid,id,name from test
AAAMpBAABAAAOvaAAA 1 oracle
AAAMpBAABAAAOvaAAB 2 oracle
AAAMpBAABAAAOvaAAC 3 oracle
AAAMpBAABAAAOvaAAD 4 oracle
AAAMpBAABAAAOvaAAE 5 oracle
aaampbaabaaaovaaaf 6 oracle
aaampbaabaaaovaaag 7 oracle
............................
1000条测试数据全部同步到备库,且ROWID没有发生变化。
PS:摘录 Data Guard Concepts and Administration
Physical standby database Provides a physically identical copy of the primary database, with on disk database structures that are identical to the primary database on a block-for-block basis. The database schema, including indexes, are the same. A physical standby database is kept synchronized with the primary database, through Redo Apply, which recovers the redo data received from the primary database and applies the redo to the physical standby database.
所以主库到备库的后的ROWID不会发生变化,所以同事的担心没有必要。