欢迎光临
我们一直在努力

高级复制中如何应对主体站点故障-数据库专栏,SQL Server

建站超值云服务器,限时71元/月

高级复制中如何应对主体站点故障作者:eygle出处:http://blog.eygle.com日期:february 18, 2005
« 在高级复制中如何切换主体定义站点 | blog首页 | 自己动手,丰衣足食 »
在同步复制中
一旦任意主体站点出现故障,数据库将会出现问题。

sql> select * from scott.dept;deptno dname loc—— ————– ————- 10 accounting new york 20 research dallas 30 sales chicago 40 operations boston 33 oracle beijing 35 oracle beijing6 rows selectedsql>

此时dml操作不能进行

sql> insert into scott.dept values (36,oracle,beijing);insert into scott.dept values (36,oracle,beijing)ora-02068: following severe error from testora9ora-03113: end-of-file on communication channelora-02068: following severe error from testora9ora-03113: end-of-file on communication channelsql> select gname,dblink,masterdef from dba_repsites;gname dblink masterdef —————————— ———————————-rep_tt conner.hurray.com.cn y rep_tt testora9.hurray.com.cn n

简单的,我们可以移除出问题的主体站点

sql> exec dbms_repcat.remove_master_databases(gname => rep_tt,master_list => testora9.hurray.com.cn);pl/sql procedure successfully completed

此后dml操作可以继续:

sql> insert into scott.dept values (36,oracle,beijing);1 row insertedsql> commit;commit completesql> select gname,dblink,masterdef from dba_repsites;gname dblink masterdef —————————— ———————————-rep_tt conner.hurray.com.cn y

如果故障站点修复之后,需要重新加入复制组,可以先在故障站点删除复制组:

sql> exec dbms_repcat.drop_master_repgroup(gname => rep_tt,drop_contents => false,all_sites => false)pl/sql procedure successfully completed

然后在主体定义站点重新加入该主体站点:

sql> exec dbms_repcat.suspend_master_activity(gname => rep_tt)pl/sql procedure successfully completedsql> execute dbms_repcat.add_master_database(gname=>rep_tt, master=>testora9.hurray.com.cn,use_existing_objects=>true, copy_rows=>false, propagation_mode => synchronous);pl/sql procedure successfully completedsql> execute dbms_repcat.resume_master_activity(rep_tt,true);pl/sql procedure successfully completedsql>

此时复制恢复正常。
接下来你需要解决的是数据冲突,可以参考:使用 dbms_rectifier_diff解决高级复制中的数据冲突问题

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » 高级复制中如何应对主体站点故障-数据库专栏,SQL Server
分享到: 更多 (0)

相关推荐

  • 暂无文章