目录

SQL-Server-2005数据库同步到另一台服务器实时,限局域网

SQL Server 2005数据库同步到另一台服务器(实时,限局域网)

准备工作

1.        二台电脑同一网段。

2.        二台电脑口令一至

3.        启动二台服务器的命名管道服务如下图

https://img-blog.csdn.net/20131018204750062

https://img-blog.csdn.net/20131018204754937

4.        登录数据库服务器时都必须选择命名管道如下图

https://img-blog.csdn.net/20131018204758812

选项

https://img-blog.csdn.net/20131018204802000

选择命名管道,确定

新建发布(在发布服务器上操作)

1,  新建发布,如下图:

https://img-blog.csdn.net/20131018204805484

2,  下一步,选择快照文件夹

https://img-blog.csdn.net/20131018204810812

此处文件夹为发布服务器上共享的文件夹,且通过订阅服务器能直接访问的

3,  下一步,选择表和存储过程

https://img-blog.csdn.net/20131018204855156

4,  下一步

https://img-blog.csdn.net/20131018204859781

5,  下一步

https://img-blog.csdn.net/20131018204906843

6,  下一步

https://img-blog.csdn.net/20131018204917531

7,  下一步

https://img-blog.csdn.net/20131018204923265

8,  点击安全设置

https://img-blog.csdn.net/20131018204934875

9,  确定,并下一步

https://img-blog.csdn.net/20131018204942609

10,             下一步

https://img-blog.csdn.net/20131018204946906

11,             完成

新建订阅

1,  新建订阅

https://img-blog.csdn.net/20131018204953484

2,  下一步

https://img-blog.csdn.net/20131018204957265

选择查询 SQL Server 发布服务器

https://img-blog.csdn.net/20131018205003453

3,  连接便可看见之前创建的发布服务器,选择之前创建的确定

https://img-blog.csdn.net/20131018205011515

4,  下一步

https://img-blog.csdn.net/20131018205016968

5,  确定

https://img-blog.csdn.net/20131018205021671

6,  下一步

https://img-blog.csdn.net/20131018205026593

7,  下一步,并完成

8,  右键刚刚创建好的订阅-属性

https://img-blog.csdn.net/20131018205031921

选择之前共享的目录确定。

完成

1,  执行发布

在发布服务器,右键新建好的发布—重新初始化所有订阅

https://img-blog.csdn.net/20131018205038562

勾选立即生成新快照,以便查看日志

点击标记为要重新初始化

右键刚刚新建好的发布,选择“启动复制监视器”可以查看执行日志

https://img-blog.csdn.net/20131018205044593

执行完成后二个数据对比一下,成功!

注意

订阅服务器上的数据库千万不要执行update,delete操作否则发布将会失败