数据迁移:DataGuard配置
本次快速搭建单实例物理DataGuard,为解决某些同事担心“那如果我在primary里面使用提交的事务操作时按照rowid去检索数据,到备库执行的和主库操作不一致”
数据库软件安装过程不再赘述。
1: 检查主库否为 force logging .
select rowid,id,name from testAAAMpBAABAAAOvaAAA1oracle AAAMpBAABAAAOvaAAB2oracle AAAMpBAABAAAOvaAAC3oracle AAAMpBAABAAAOvaAAD4oracle AAAMpBAABAAAOvaAAE5oracle aaampbaabaaaovaaaf6oracle aaampbaabaaaovaaag7oracle ............................
1000条测试数据全部同步到备库,且ROWID没有发生变化。
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不会发生变化,所以同事的担心没有必要。做这件事情的同时想起exp/imp,expdp/impdp做备份还原的时候会修改rowid的值,所以如果所做的备份库的应用中使用了ROWID,千万不要使用exp/imp,expdp/impd做数据迁移。