Little background: I'm working in a large company with a lot of branches. We have several applications with separated databases sometimes on different servers. But every database contains a table with a list of branches and their relationships. I want to automatically synchronize these tables when one of them changed.
小背景:我在一家拥有大量分支机构的大公司工作。我们有几个应用程序,有时在不同的服但是每个数据库都包含一个包含分支列表及其关系的表。我想在其中一个表发生更改时自动同步这些表。
My question is: what are the best practices of automatic synchronization of tables in different databases (Microsoft SQL Server 2008)?
我的问题是:在不同数据库(Microsoft SQL Server 2008)中自动同步表的最佳做法是什么?
Are there sql server features for that purpose? Or external tool is a good way? Or it's better to write a small application and run it as a service or use the scheduler?
是否有用于此目的的SQL Server功能?或外部工具是一个好方法?或者最好编写一个小应用程序并将其作为服务运行或使用调度程序?
1 个解决方案
#1
2
You can use replication (a SQL server built-in feature) to synchronize different databases. You can also use triggers or log shipping to sync your tables as records are added ,updated or deleted:
您可以使用复制(SQL Server内置功能)来同步不同的数据库。在添加,更新或删除记录时,您还可以使用触发器或日志传送来同步表:
Here are some links about replication.
以下是有关复制的一些链接。
Here are some links about log shipping.
以下是一些关于日志传送的链接。
#1
2
You can use replication (a SQL server built-in feature) to synchronize different databases. You can also use triggers or log shipping to sync your tables as records are added ,updated or deleted:
您可以使用复制(SQL Server内置功能)来同步不同的数据库。在添加,更新或删除记录时,您还可以使用触发器或日志传送来同步表:
Here are some links about replication.
以下是有关复制的一些链接。
Here are some links about log shipping.
以下是一些关于日志传送的链接。