导入数据层应用程序失败 [英] Import data tier application is failing

查看:184
本文介绍了导入数据层应用程序失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将数据库备份(.bacpac文件)还原到本地SQL Server 2016实例时遇到以下错误.

I'm getting the following error while restoring the database backup (.bacpac file) into my on premise SQL Server 2016 instance.

标题:Microsoft SQL Server Management Studio

TITLE: Microsoft SQL Server Management Studio

无法导入包.

警告SQL72012:对象[Azure_Data]存在于目标中,但是即使选中了为目标数据库中的对象而不是源中的对象生成放置语句"复选框,也不会将其删除.

Warning SQL72012: The object [Azure_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.

警告SQL72012:对象[Azure_Log]存在于目标中,但即使选中了为目标数据库中的对象但不在源中的对象生成放置语句"复选框,也不会将其删除.

Warning SQL72012: The object [Azure_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.

错误SQL72014:.Net SqlClient数据提供程序:

Error SQL72014: .Net SqlClient Data Provider:

33161,状态1,第1行,消息33
此版本的SQL Server不支持没有密码的数据库主密钥.

Msg 33161, Level 15, State 1, Line 1
Database master keys without password are not supported in this version of SQL Server.

错误SQL72045:脚本执行错误.执行的脚本:CREATE MASTER KEY;

Error SQL72045: Script execution error. The executed script: CREATE MASTER KEY;

推荐答案

这是由于SQL Azure和SQL Server 2016之间的差异.具有主密码而没有密码是仅Azure的功能.有两种方法可以解决此问题.

This is due to a difference between SQL Azure and SQL Server 2016. Having a master key without a password is an Azure-only feature. There are two ways to address this issue.

1)打开.bacpac并删除主密钥对象以及凭据对象. (将.bacpac重命名为.zip,解压缩,然后浏览xml文件,进行必要的更改,压缩后再重新命名为.bacpac)

1) open the .bacpac and remove the master key object as well as the credential object. (Rename the .bacpac to .zip, unzip and then look through the xml files, make necessary changes, zip back up and rename back to .bacpac)

2)在使用以下方法将数据库导出到.bacpac之前,将密码加密添加到主密钥中: ALTER MASTER KEY ADD ENCRYPTION BY PASSWORD = '<PasswordHere>';

2) add password encryption to the master key before you export the database to a .bacpac using the following: ALTER MASTER KEY ADD ENCRYPTION BY PASSWORD = '<PasswordHere>';

这篇关于导入数据层应用程序失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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