SQL Server 2005/2008 国际实时可用性
我的公司最近在新加坡开设了办事处。 我使用 SQL Server 2005 后端开发我们内部用于管理公司的 Web 应用程序。 由于新加坡的网络访问速度较慢,我们为他们提供了一台服务器,用于托管网络应用程序和数据库的本地副本,并且我们希望使他们的本地数据库版本与我们的保持同步。 美国应用程序和新加坡应用程序都可以读取/写入数据。
合并复制是解决这个问题的正确方法吗? 这是我一直在研究的路径,它似乎最适合我们想要的。 SQL Server 2008 有更好的东西吗? 您为国际合作实施了哪些类型的数据库可用性解决方案?
My company recently opened an office in Singapore. I work on the web application we use internally to manage the company, using a SQL Server 2005 back-end. Because of slow access over the net from Singapore, we're shipping them a server that will host a local copy of the web app and database and we want to keep their local version of the database synchronized with ours. Both the US app and the Singapore app can read/write data.
Is merge replication the right solution for this problem? This is the path I've been investigating and it seems the closest fit for what we want. Is there something better in SQL Server 2008? What type of database availability solutions have you implemented for international collaboration?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果两个位置的某些人都必须更新任何数据,则合并复制是一种可行的方法。 但是...
我建议在以下情况下使用点对点复制:
Office1(美国?)需要仅更新/删除 Office1 应用程序插入的记录。
Office2(新加坡)只需要更新/删除 Office2 应用插入的记录。
两个办事处均可查询所有数据。
引用:
在对等复制中您需要了解的最基本概念是,每个服务器都包含所有数据,但每个服务器只负责更新自己的数据子集。 因此,每个服务器都具有相同的模式,并且每个服务器都是其他服务器上发生的所有更改的订阅者,同时也是其自己的更改数据的发布者。 当一台服务器上的数据发生更改时,这些更改会发送到对等网络中的所有订阅者。 每个服务器都包含并更新特定于其地理位置的数据,并且还可以查看来自其他位置的所有数据。 对等复制的一个关键部分是每个服务器负责更改自己的数据集,并且其他位置不能更改该数据集中的任何数据。 如果违反此规则,数据可能会在两个位置发生更改,并且由于站点之间没有数据锁定,因此在复制数据时,最终可能会得到不一致的结果。
您可以在这里找到更多信息:
http://www.sqlmag.com/Article/ArticleID/49241/sql_server_49241。 html
http://technet.microsoft.com/en -us/magazine/2006.07.insidemsft.aspx
http://www.sql-server-performance.com/articles/dba/peer-to-peer_replication_p1.aspx
如何实现。
必须从必须复制的两个位置更新的表,例如:
然后使用对等复制将数据从 TableOrders1 发送到 Office2,将数据从 TableOrders2 发送到 Office1 等等...
要查询数据,您可以创建视图。
Merge replication is way to go if some people in both locations have to update any data. But...
I could recommend using of peer-to-peer replication in the case if:
Office1 (US?) needs to update/delete only records inserted by Office1 apps.
Office2 (Singapore) needs to update/delete only records inserted by Office2 apps.
Both offices can query all data.
Quote:
The most basic concept you need to understand in peer-to-peer replication is that every server contains all of the data but each server is responsible for updating only its own subset of data. Thus, every server carries the same schema and each server is a subscriber to all the changes that happen on the other servers while being a publisher of its own changed data. When data changes on one server, those changes go out to all the subscribers in the peer-to-peer network. Each server contains and updates data specific to its geographic location and also sees all the data from the other locations. A key part of peer-to-peer replication is that each server is responsible for changing its own data set and no other location can change any of the data in that data set. If this rule is violated, the data could be changed in two places, and because there's no data locking between sites, when the data is replicated, you can end up with inconsistent results.
More info you can find here:
http://www.sqlmag.com/Article/ArticleID/49241/sql_server_49241.html
http://technet.microsoft.com/en-us/magazine/2006.07.insidemsft.aspx
http://www.sql-server-performance.com/articles/dba/peer-to-peer_replication_p1.aspx
How it can be implemented.
Tables which must be updated from both locations you have to duplicate, for example:
Then you send data from TableOrders1 to Office2, data from TableOrders2 to Office1 using peer-to-peer replication and so on…
To query data you can create a view.