Azure数据同步群集索引错误 [英] Azure Data Sync Clustered Index Error

查看:102
本文介绍了Azure数据同步群集索引错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正试图设置一个Azure数据库同步组,以将我们的数据从本地服务器复制到Azure SQL数据库.这是向Azure迁移的第一步.

We are trying to setup an Azure Database Sync group to replicate our data from an on-premise server to an Azure SQL database. This as a first step for a migration to Azure.

所有同步组和同步代理均已设置. 当我们按下同步"按钮时,我们收到以下错误:

The Sync Group and Sync Agent have all been set up. When we press the 'Sync' button we receive following error:

触发器同步失败:无法执行数据同步操作:表'[dbo].[DocumentTypeDocumentVariables]'没有聚集索引.

Trigger Sync Failed: Failed to perform data sync operation: Table '[dbo].[DocumentTypeDocumentVariables]' do not have clustered index.

此表没有聚簇索引,但是没有聚簇的唯一primairy键索引.

This table did not have a clustered index but an unclustered unique primairy key index.

  • 我们尝试添加聚簇索引,但这会产生相同的错误.
  • 我们试图删除未聚类的PK索引并创建了唯一的聚簇PK索引,但这给了我们同样的错误.

有什么问题吗?

推荐答案

请使用与本地数据库相同的架构(包括索引),并且在没有数据的情况下,在Azure SQL数据库上重新创建数据库,然后尝试配置SQL数据同步.您可以使用SQL Server Management Studio创建不包含本地数据库数据的脚本,然后使用该脚本在Azure SQL数据库上重新创建所有数据库对象.在Azure上没有数据也将使初始同步也更快.如果两个数据库架构都不同,则SQL Data Sync无法正常工作

Please recreate the database on Azure SQL Database with the same schema (including indexes) as the on-premise database and with no data, then try to configure SQL Data Sync. You can create a script with no data of the on-premise database using SQL Server Management Studio and then use the script to recreate all database objects on Azure SQL Database. Having no data on Azure will make the initial sync faster also. If both database schemas have differences then SQL Data Sync won't work

这篇关于Azure数据同步群集索引错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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