gpt4 book ai didi

sql-server - 导入数据层应用程序失败

转载 作者:行者123 更新时间:2023-12-02 17:27:31 30 4
gpt4 key购买 nike

将数据库备份(.bacpac 文件)恢复到我的本地 SQL Server 2016 实例时遇到以下错误。

TITLE: Microsoft SQL Server Management Studio

Could not import package.

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.

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.

Error SQL72014: .Net SqlClient Data Provider:

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

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

最佳答案

这是由于 SQL Azure 和 SQL Server 2016 之间的差异造成的。拥有没有密码的主 key 是 Azure 独有的功能。有两种方法可以解决此问题。

1) 打开.bacpac 并删除主 key 对象和凭证对象。 (将 .bacpac 重命名为 .zip,解压缩,然后查看 xml 文件,进行必要的更改,压缩备份并重命名回 .bacpac)

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

关于sql-server - 导入数据层应用程序失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47616989/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com