Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error while importing bacpak in Sql Server 2012

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

like image 286
Nik Avatar asked Aug 12 '14 03:08

Nik


People also ask

How do I import a Bacpac file to an existing database?

To import from a BACPAC file into a new single database using the Azure portal, open the appropriate server page and then, on the toolbar, select Import database. Select the storage account and the container for the BACPAC file and then select the BACPAC file from which to import.

What is the difference between Dacpac and Bacpac?

bacpac can be imported into a new database or a . dacpac can be published to a new or existing database.


1 Answers

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.

like image 140
Kevin Cunnane Avatar answered Oct 01 '22 17:10

Kevin Cunnane