无法将SQL Azure bacpac导入2016 CTP

JustSteve

我对从Azure SQL V12导出到我的开发箱然后再导入到本地sql(2014)实例的过程非常熟悉。我正在整理一个新的Win10框并安装了SQL 2016 CTP。我正在连接到同一Azure实例并可以对其进行操作-可以像2014年一样导出.bacpac。

但是,当我尝试导入本地时,我得到:

Could not import package.
Warning SQL72012: The object [FOO33_Data] exists in the target, but it will not be dropped even though you selected the 'Generate drop statements for objects that are in the target database but that are not in the source' check box.
Warning SQL72012: The object [FOO33_Log] exists in the target, but it will not be dropped even though you selected the 'Generate drop statements for objects that are in the target database but that are not in the source' check box.
Error SQL72014: .Net SqlClient Data Provider: Msg 547, Level 16, State 0, Line 3 The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "FK_dbo.Address_dbo.User_idUser". The conflict occurred in database "FOO33", table "dbo.User", column 'idUser'.
Error SQL72045: Script execution error.  The executed script:
PRINT N'Checking constraint: FK_dbo.Address_dbo.User_idUser [dbo].[Address]';

ALTER TABLE [dbo].[Address] WITH CHECK CHECK CONSTRAINT [FK_dbo.Address_dbo.User_idUser];
努玛

由于在MSDN上也有人提出和回答了这个问题,因此我将在这里分享。https://social.msdn.microsoft.com/Forums/azure/zh-CN/0b025206-5ea4-4ecb-b475-c7fabdb6df64/cannot-import-sql-azure-bacpac-to-2016-ctp?forum=ssdsgetstarted

链接答案中的文字:

我怀疑这里出问题的原因是,导出操作是使用数据库实例执行的,而该数据库实例在导出过程中一直在变化。这可能导致导出的表数据不一致,因为与SQL Server的物理备份/还原不同,导出不能保证事务的一致性。相反,它们实际上是通过依次连接到数据库中的每个表并运行select *来执行的。当两个表之间存在外键关系并且读取的表数据不一致时,在将数据写入数据库并且导入代码尝试重新启用外键之后,导入过程中会导致错误。我们建议使用数据库复制机制(将数据库copyDb创建为originalDb的副本),以确保副本具有事务一致性,

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

SSMS 2016错误导入Azure SQL v12 bacpac:不支持没有密码的主键

SQL Azure V12 BACPAC导入错误:“内部目标平台类型SqlAzureV12DatabaseSchemaProvider不支持架构文件版本'3.3'”

Azure SQL数据库Bacpac本地还原

无法在Windows 8.1上安装Visual Studio 2014 CTP

如何使用Visual Studio将Azure SQL备份(.bacpac)导入LocalDB?

无法将数据库导入/部署到SQL Azure:“指定的服务目标(业务/ Web)无效。”

使用Sql Server Management Studio 2016导入bacpac时出错-无法加载文件或程序集Microsoft.SqlServer.Dac

SQL Azure BACPAC提取

SQL Azure V12 BACPAC导入错误:“内部目标平台类型SqlAzureV12DatabaseSchemaProvider不支持架构文件版本'3.5'。”

Azure SQL Server BACPAC导入失败

无法导入SQL Azure V12 BACPAC:“类型Microsoft.Data.Tools.Schema.Sql.SqlAzureV12DatabaseSchemaProvider无效”

即使SSMS连接没有问题,也无法将Excel 2016连接到Azure SQL数据库

Azure Powershell命令无法将bacpac文件存储在Azure Blob存储中

CakePHP 3将.ctp模板输出为CSV文件

Polybase:Azure Sql DB无法导入Blob存储

无法将Azure SQL与Azure中的Azure AD用户连接

将BACPAC文件导入到Azure中以创建新数据库,但是数据库级用户似乎未正确导入?

无法将JSON数据导入Azure Event Hub

我无法在default.ctp中加载块

内部错误将BACPAC文件导入Windows Azure SQL数据库

无法安装Apache Cordova CTP3的工具

导入 SQL Server .bacpac 文件

使用 windows server 2016 和 sql server vNext CTP 1.4 创建无集群可用性组

升级到 2016 后无法导入 Azure V12 bacpac

Azure 函数 - 从 Azure sql server 中的 blob 存储导入 bacpac 文件 - AAD 令牌

cakephp 将变量传递给 home.ctp

Write-SqlTableData 将 CSV 导入 Azure SQL Server 表

无法将列同步到 Azure SQL

在 AWS RDS 上的 SQL Server 中导入 .bacpac 文件