Azure bacpac restoring Issues & resolutions

There are two issues faced by me during restoring the bacpac file.

ERROR 1: Create User with Password

Could not import package Error:SQL72045 script execution error. CREATE USER [usersample] WITH PASSWORD = sasaas%$##$#$#$#$#$

To resolve the above issue, this property is missing in bacpac azure DB export.

1.Rename your .bacpac file to .zip

2.Export the zip content to a new folder

3.Modify the model.xml and add <Property Name=”Containment” Value=”1″ />

4.its the time to change the check sum

  1. download dacchksum.exe from this urlhttps://github.com/gertd/dac/tree/master/drop/debug
  2. 6. Copy dacchksum.exe in the same directory as .bacpac resides

7.Open Command Prompt and then navigate to the old directory, then execute the following command to generate the new check sum

Command: dacchksum.exe /i:Azurebackup.bacpac

Copy the checksum values from Calculated:[]

  1. open origin.xml then add the new Checksum then save the file.
  2. Compress the folder as zip then rename the .zip to .bacpac
  3. its done. You can start importing in Sql Server 2016 successfully

Error 2: CREATE MASTER KEY

This is second error faced in restoring the bacpac file.

Could not import package.
Error SQL72014: .Net SqlClient Data Provider: Msg 15578, Level 16, State 1, Line 1 There is already a master key in the database. Please drop it before performing this statement.
Error SQL72045: Script execution error. The executed script:
CREATE MASTER KEY;

 

to resolve this issue Follow Option 2 from

https://blogs.msdn.microsoft.com/azuresqldbsupport/2017/03/30/exported-database-from-azure-sql-failed-to-be-imported-to-azure-sql-or-to-local-sql-server/

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Powered by WordPress.com.

Up ↑