Error while importing bacpak in Sql Server 2012

Nik picture Nik · Aug 12, 2014 · Viewed 10.8k times · Source

I'm getting this error while importing bacpac file from windows azure

TITLE: Microsoft SQL Server Management Studio
------------------------------

Count not load schema model from package. (Microsoft.SqlServer.Dac)

------------------------------
ADDITIONAL INFORMATION:

Internal Error.  The internal target platform type SqlAzureDatabaseSchemaProvider
does not support schema file version '2.5'. 

Most of the help online suggests upgrading SSDT, but I have the latest version of SSDT for VS2012 already installed

Answer

Kevin Cunnane picture Kevin Cunnane · Aug 12, 2014

Update - with a number of new features including Query Store, it's now best to use the SQL Server Management Studio Preview to import. In some cases this will be necessary given updated features in the bacpac file. You can install this from its download page. On that download page choose "Download SQL Server Management Studio Preview" to install.

Original Answer The best solution is to install SQL Server Management Studio 2014 from the Express download page. On that download page choose "MgmtStudio 32BIT\SQLManagementStudio_x86_ENU.exe" installer when clicking the download link. SSMS 2014 contains a more recent DacFx version that supports version 2.5 and has full support for SQL Server 2005-2014 dbs, along with Azure DBs.

A few notes on DacFx / SqlPackage:

  • Installing the latest SSDT won't fix the issue since SSDT no longer installs Dac DLLs in a shared location. Instead it installs them under the Visual Studio install dir (C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Extensions\Microsoft\SQLDB\DAC\120).

  • To update DacFx binaries used in SSMS to the latest version you must install the DacFramework.msi directly. You can download the latest version for 2014 here (this will update the location used by SSMS 2014), or if you have to use SSMS 2012 the last version compatible with that is found here.

  • SqlPackage.exe does support bacpacs. You need to use the Import/Export actionsfor bacpacs rather than the Extract/Publish actions used for dacpacs.