我已经这样做了几十次,但最近遇到了这个错误.以下是我到达这里所经历的步骤:
I have done this dozens of times but just recently ran into this error. Here are the steps I have gone through to get here:
它只需要几秒钟就炸毁了,我得到了错误:
It only takes a few seconds for it to bomb out and I get the error:
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;
我在 1.5 个月前对同一个数据库执行了相同的过程,一切正常……还有其他人遇到过这个吗???我安装了 SSDT 版本 14.0.61021.0 - 不确定这是否重要.我也在运行 SQL Server 2016 开发人员版 (v13.0.1722.0).
I followed the same process for the same database 1.5 months ago any everything worked fine...Is anyone else experiencing this??? I have SSDT version 14.0.61021.0 installed - not sure if that matters or not. I'm also running SQL Server 2016 Developer Edition (v13.0.1722.0).
好吧,我最终解决这个问题的方法是执行以下操作:
Okay the way I ended up resolving this issue was to do the following:
在该数据库中运行以下脚本:
In that database run the following script:
ALTER MASTER KEY REGENERATE WITH ENCRYPTION BY PASSWORD = [password here];
我还没有看到关于此的文档,但很明显,当您创建 Azure SQL 数据库时,它会创建一个没有密码的数据库主密钥 (DMK),而在 SQL Server 2016 中这是不行的.希望这可以帮助其他人.
I haven't seen documentation on this, but apparently when you create an Azure SQL database it creates a database master key (DMK) without a password, and in SQL Server 2016 this is not okay. Hopefully this helps somebody else out.
注意:我能够这样做是因为我只希望原始数据库中的数据刷新我的本地开发副本 - 我还没有完全研究这的含义.
Note: I was able to do this since I only wanted the data from the original database to refresh my local development copy - I haven't fully researched the implications of this.
这篇关于SSMS 2016 错误导入 Azure SQL v12 bacpac:不支持没有密码的主密钥的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!