Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Azure by (45.3k points)
edited by

I have done this dozen of times but just recently ran into this error. Here are the steps I have gone through to get here:

  1. Create a copy of my Azure SQL v12 database on the same server as the original
  2. Export the copy-version (completely inactive from user interaction) to blob storage
  3. Download the .bacpac file from blob storage to my local drive
  4. In SSMS (October 2016 release) my local SQL server instance, right-click Databases and choose 'Import Data Tier Application'
  5. Choose my recently downloaded bacpac file and start the import

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;

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).

1 Answer

0 votes
by (16.8k points)

First, you need to create a copy of your SQL Azure Database on the same as the original.

After that, run this script on your database: 

ALTER MASTER KEY REGENERATE WITH ENCRYPTION BY PASSWORD = [password here];

Then, make sure to follow the steps from 2 to 5 in your question, which are:

  • Export the copy-version (completely inactive from user interaction) to blob storage
  • Download the .bacpac file from blob storage to my local drive
  • In SSMS (October 2016 release) my local sql server instance, right click Databases and choose 'Import Data Tier Application'
  • Choose my recently downloaded bacpac file and start the import

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...