在Sql Server中同步 [英] Synchronization In Sql Server

查看:83
本文介绍了在Sql Server中同步的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了一项新任务,我必须升级我的应用程序,以便在位于远程站点的任何数据库中创建条目时,必须在主服务器上更新数据。细节问题就像我们想要设计系统一样,用户不知道他只需要使用应用程序进行工作就可以连接数据库。所以我想实现这样的设计,其中输入的数据总是在服务器数据库上更新。我想到的方式是在线和离线连接。离线连接非常重要,因为无法保证每次都能在每个站点上建立Internet连接,因此即使没有Internet连接,用户也可以使用应用程序,然后可以在预定的时间连接到服务器以更新数据。服务器。我想过要恢复数据库,但是每天都可以这样做,因为数据库的大小每时每刻都在增加。所以我需要找到实现这种设计的方法,其中用户没有更新目的,数据在预定时间(在离线模式下)自动更新,并在连接时(在线模式)持续更新。 br />
例如电子邮件,火车票预订等。



那么任何人都可以对此有任何见解吗?

提前谢谢

I have come across a new task where in i have to upgrade my application such that when the entries are made in any of the databases located at remote site, the data must be updated at the main server. The detail problem is like we want to design the system such that the user is unaware about the connectivity of the database he just has to use the application for his work. so I want to implement such design where the data entered is always updated on the server database. The ways I thought for is the online and offline connection. Offline connection is important as there is no guarantee of having the Internet connection on every site at every time so even if there is no internet connection the user can use application and can then connect to the server at a scheduled time for updating the data at the server. I thought of restoring the database, but this can't be done everyday as the size of database will be increasing every moment. So I need to find out ways of implementing such design where the user is free from the updating purpose, the data automatically gets updated at scheduled time(in offline mode) and keeps on updating continuously when it is connected(in online mode).
For example the emails, Train tickets reservation, etc.

So can any one give any insight on this please?
Thanks in advance

推荐答案

几年前我做过类似的事情我可以告诉你这不是一个好任务!

很大程度上取决于您使用的SQL-Server版本 - 工具越来越好。另一个关键点是数据是否共享 - 换句话说,如果可以在任何位置更新相同的行,那么任务就会复杂得多。



但是这里有一些起点...



事务复制是您研究的关键词 - 微软文章可以找到这里 [ ^ ]和另一个这里 [ ^ ]



如果您使用的是SQL 2005,那么这个详细的操作方法 [ ^ ]将很有用



SQL2008向上看这篇文章 [ ^ ]使用Sync并包含代码示例。



根据您的预算和专业知识,我的建议将是第三个 - 开箱即用的解决方案,而不是自己编写/配置一些东西 - 这里是一个示例产品来自Red-Gate [ ^ ] < br $> b $ b

祝你好运
Having done something similar a few years ago I can tell you that this is not a nice task!
Much will depend on which version of SQL-Server you are using - the tools have been getting better. Another key point is whether or not the data is shared - in other words if the same rows can be updated at any of the locations then the task is far more complicated.

However here are some starting points ...

Transactional Replication is a key phrase for your research - Microsoft article can be found here[^] and another here[^]

If you are using SQL 2005 then this detailed how-to[^] will be useful

SQL2008 upwards see this article[^] which uses Sync and includes a code sample.

Depending on your budget and expertise, my advice would be go for a third-party out-of-the-box solution rather than trying to write/configure something yourself - here''s an example product from Red-Gate[^]

Good luck


这篇关于在Sql Server中同步的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆