5

Since we upgraded some of our Azure SQL servers to V12, we can no longer restore a bacpac locally using command line sqlpackage.exe. We also tried using Management Studio, but no dice.

Our local developer machines are running:

Microsoft SQL Server 2014 - 12.0.4213.0 (X64) Jun 9 2015 12:06:16 Copyright (c) Microsoft Corporation Developer Edition (64-bit) on Windows NT 6.3 (Build 9600: )

Here is the error we encounter:

*** Error importing database:Could not import package. Error SQL72014: .Net SqlClient Data Provider: Msg 33233, Level 16, State 1, Line 1 You can only create a user with a password in a contained database. Error SQL72045: Script execution error....

This looks like it is having issues creating the users that were added by scripts.

Is anyone else running into this issue?

Update: Apparently this has been a reported problem since April. https://social.msdn.microsoft.com/Forums/sqlserver/en-US/85bb12e8-5ae4-409c-93fa-8a9d025c6b35/error-when-importing-a-datatiers-application-from-azure-db-as-contained?forum=ssdt

The work around from the above post works. You need to modify the bacpac file and create a new checksum: http://inworksllc.com/editing-sql-database-azure-bacpac-files/

This is a workaround, not a fix.

Update: Looks like there will be a fix soon.

Dave
  • 629
  • 6
  • 11
  • 1
    Hi Dave, we are targeting this for our September Preview release (SSMS and SSDT, both of which install SqlPackage.exe). Thanks for raising this, the bug # is 4592376 if you need this when communicating with CSS or other representatives. – Kevin Cunnane Aug 14 '15 at 17:27
  • I have just tried to restore an Azure v12 BACPAC with a Contained User to SQL Server 2014, using the SMSS 2016 RC (February 13.0.12000.65) and I get...Error SQL72014: .Net SqlClient Data Provider: Msg 12824, Level 16, State 1, Line 5 The sp_configure value 'contained database authentication' must be set to 1 in order to alter a contained database. ... Does this mean the bug is still there? Bit fundamental not bein able to restore to a local server. – Nick Wallbridge Mar 10 '16 at 17:19
  • 1
    Ok, my bad. RTFM or in this case the error message. My local database instance was not configured to allow Contained Users. When I changed this, the restore worked with SMSS 16. The command to enabled Contained Users is: EXEC sp_configure 'contained', 1; RECONFIGURE; – Nick Wallbridge Mar 10 '16 at 17:37

0 Answers0