保持本地MS SQL 2008 DB表和远程SQL Azure DB表同步

时间:2022-08-05 02:48:07

I have a dedicated server which hosts a Windows Service which does a lot of very heavy load stuff and populates a number of SQL Server database tables.

我有一个专用的服务器,它托管一个Windows服务,它执行大量繁重的负载,并填充许多SQL server数据库表。

However, of all the database tables it populates and works with, I want only one to be synchronised with a remote SQL Azure DB table. This is because this table holds what I called Resolved data, which is the end result of the Windows Service's work.

但是,在它填充和使用的所有数据库表中,我只希望其中一个与远程SQL Azure DB表同步。这是因为该表包含我所称的已解析数据,这是Windows服务工作的最终结果。

I would like to keep a SQL Azure database table in sync with this database table.

我希望SQL Azure数据库表与这个数据库表保持同步。

As far as I understand, my options are:

据我所知,我的选择是:

  • Move everything onto Azure (but that involves a massive development overhead and risk)
  • 将一切都转移到Azure上(但这需要大量的开发开销和风险)
  • Have another Windows Service on the dedicated server which essentially looks at changed records since the last update and then manually update the SQL Azure table
  • 在专用服务器上有另一个Windows服务,它主要查看自上次更新以来的更改记录,然后手动更新SQL Azure表吗

3 个解决方案

#1


4  

Microsoft has the SQL Azure Data Sync used with the Sync framework:

微软有与同步框架一起使用的SQL Azure数据同步:

http://www.microsoft.com/windowsazure/developers/sqlazure/datasync/

http://www.microsoft.com/windowsazure/developers/sqlazure/datasync/

This can be used from T-SQL and the SQL Agent:

这可以从T-SQL和SQL代理中使用:

http://blogs.msdn.com/b/sync/archive/2010/03/25/initiating-sync-to-sql-azure-using-sql.aspx

http://blogs.msdn.com/b/sync/archive/2010/03/25/initiating-sync-to-sql-azure-using-sql.aspx

#2


0  

Conversely, you could have a daily backup performed on your main database tables that only backs up changes. Then you could transfer the backup file to the SQL Azure database host and Restore from the file. At that point, you would have them in sync through daily scheduled tasks that shouldn't take very much effort. The BACKUP and RESTORE T-SQL commands should accomplish what you're looking for, and SQL Azure says it supports T-SQL.

相反,您可以对主数据库表执行每日备份,只备份更改。然后,您可以将备份文件转移到SQL Azure数据库主机并从文件中恢复。此时,您将使它们在不需要花费太多精力的日常计划任务中保持同步。备份和恢复T-SQL命令应该能够完成您所需要的任务,而SQL Azure则表示它支持T-SQL。

#3


0  

Try SQL Examiner Suite http://www.sqlaccessories.com/SQL_Examiner_Suite/

试试SQL Examiner Suite http://www.sqlaccessories.com/SQL_Examiner_Suite/

This tool can synchronize your local database with SQL Azure database (both schema and data)

该工具可以使用SQL Azure数据库(模式和数据)同步本地数据库

#1


4  

Microsoft has the SQL Azure Data Sync used with the Sync framework:

微软有与同步框架一起使用的SQL Azure数据同步:

http://www.microsoft.com/windowsazure/developers/sqlazure/datasync/

http://www.microsoft.com/windowsazure/developers/sqlazure/datasync/

This can be used from T-SQL and the SQL Agent:

这可以从T-SQL和SQL代理中使用:

http://blogs.msdn.com/b/sync/archive/2010/03/25/initiating-sync-to-sql-azure-using-sql.aspx

http://blogs.msdn.com/b/sync/archive/2010/03/25/initiating-sync-to-sql-azure-using-sql.aspx

#2


0  

Conversely, you could have a daily backup performed on your main database tables that only backs up changes. Then you could transfer the backup file to the SQL Azure database host and Restore from the file. At that point, you would have them in sync through daily scheduled tasks that shouldn't take very much effort. The BACKUP and RESTORE T-SQL commands should accomplish what you're looking for, and SQL Azure says it supports T-SQL.

相反,您可以对主数据库表执行每日备份,只备份更改。然后,您可以将备份文件转移到SQL Azure数据库主机并从文件中恢复。此时,您将使它们在不需要花费太多精力的日常计划任务中保持同步。备份和恢复T-SQL命令应该能够完成您所需要的任务,而SQL Azure则表示它支持T-SQL。

#3


0  

Try SQL Examiner Suite http://www.sqlaccessories.com/SQL_Examiner_Suite/

试试SQL Examiner Suite http://www.sqlaccessories.com/SQL_Examiner_Suite/

This tool can synchronize your local database with SQL Azure database (both schema and data)

该工具可以使用SQL Azure数据库(模式和数据)同步本地数据库