每当我尝试在本地sql服务器上导入BACPAC时,我收到以下错误消息:
TITLE: Microsoft SQL Server Management Studio
------------------------------
Could not import package.
Warning SQL0: The source contains users that rely on an external authentication provider that is not supported by the target. These users will be treated as users without logins.
Warning SQL72012: The object [DB_NAME_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 [DB_NAME_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;
(Microsoft.SqlServer.Dac)
------------------------------
BUTTONS:
OK
------------------------------
之前报道的SO问题与此问题不同。以前有人遇到过同样的问题吗?
答案 0 :(得分:6)
最后,我可以按照建议的here
选项2来解决此问题简而言之,
.\RemoveMasterKey.ps1 -bacpacPath "C:\BacPacs\fileName.bacpac"
一旦上面的命令完成,我们得到无缝导入的-patched bacpac。
使用新的MS SQL Server 2016(13.0.1745.2)和SSMS v17.6,这不再是问题了。
答案 1 :(得分:4)
尝试在您的master
数据库上运行此文件(在SSMS->新建查询中右键单击服务器名称)
sp_configure 'contained database authentication', 1;
GO
RECONFIGURE;
GO
此后,您可以再次执行导入bacpac向导,该问题应得到解决。