importing SQL Server .bacpac file - sql-server

I've been trying (and failing) to import a SQL .bacpac file to SQL 2014 Express. Does anyone know if it's even possible to import these to Express? I haven't found anything online saying otherwise, but thinking of just getting the developer edition to try that instead. For info here is the error I get
Internal Error. The database platform service with type Microsoft.Data.Tools.Schema.Sql.Sql130DatabaseSchemaProvider is not valid. You must make sure the service is loaded, or you must provide the full type name of a valid database platform service. (Microsoft.Data.Tools.Schema.Sql)
thanks

This did not work because the version of SqlPackage.exe, SSMS or the Data-Tier Application Framework that you're using to import the bacpac file to your server is too old and therefore doesn't know about SQL Server 2016. If you install the latest version of SSMS (https://learn.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms) you should be able to import that bacpac file.
However -- do note that if your bacpac file contains any object that isn't supported in SQL Server 2014 (for example, a temporal table), then the import operation will fail.

The '130' database level is SQL 2016, but you are attempting to restore it to a SQL 2014 database. SQL Server backups have never been backward compatible.

Related

BACPAC from SQL Azure Error when import it

I tried to import my db from SQL Azure, but I am getting the next error in SQL Server Management Studio from each version that I specified:
SQL Server Management Studio v17.9.1:
Could not load schema model from package. (Microsoft.SqlServer.Dac)
ADDITIONAL INFORMATION:
Internal Error. The database platform service with type Microsoft.Data.Tools.Schema.Sql.Sql150DatabaseSchemaProvider is not valid.
You must make sure the service is loaded, or you must provide the full type name of a valid database platform service.
(Microsoft.Data.Tools.Schema.Sql)
SQL Server Management Studio v18.0 Preview 5:
Failed to retrieve data for this request. (Microsoft.SqlServer.Management.Sdk.Sfc)
ADDITIONAL INFORMATION:
There is already an open DataReader associated with this Command which must be closed first. (System.Data)
The version when I am trying to import SQL Server is
Uninstall SQL Server Management Studio 2018, then install SSMS v17.9.1. Re-import the Bacpac and you will have better results.
For this import error, you can try this way :
Install Microsoft SQL Server Data-Tier Application Framework (February 2015) ( Both the x64 and x86 versions).
Here is the link may be useful for you:
Unable to import SQL Azure V12 BACPAC: "type Microsoft.Data.Tools.Schema.Sql.SqlAzureV12DatabaseSchemaProvider is not valid"
I've actually been having a very similar problem.
Although I had a slightly different error message for MSSMSv17 (in regards to the additional information).
But the same error for MSSMSv18 (Preview 6).
So after trying many different things until I had irreversible damaged my SQL server installations to the point where I had to reinstall Windows, the first thing I installed was SQL Server 2017 & MSSMSv18. Which produced the same error as before. But MSSMSv17 worked, soo... yay?

Restoring database from Azure BACPAC gives an error

I'm trying to restore database created as the BACPAC on Azure.
I have exported the Azure database to Azure Storage
Downloaded the BACPAC file to local computer.
I have used build in functionality of SQL Server Management Studio, which is "Import Data-tier Application...".
But it gives me following error:
The Element or Annotation class SqlDatabaseOptions does not contain the Property class CatalogCollation.
Full error info :
TITLE: Microsoft SQL Server Management Studio
Could not load schema model from package. (Microsoft.SqlServer.Dac)
INFORMATION:
The Element or Annotation class SqlDatabaseOptions does not contain the Property class CatalogCollation. (Microsoft.Data.Tools.Schema.Sql)
I am restoring it on SQL Server 2014. I have tried to use both Sql Server Management Studio 2014 and 2017.
Any one can help?
UPDATE:
This fix doesn't work for this case:
My error is regarding the CatalogCollation and not the QueryStoreStaleQueryThreshold...
It's always best to use the latest SSMS version with Azure SQL Database to keep up with incremental changes. The problem is that you were using the older version of SSMS (17.3).
You can get the latest SSMS version from the menu (Tools--->Check for updates).

SQL Server - import bacpac file of Azure SQL database to SQL Server 2014 on Virtual Machine

We are moving our Azure SQL Database to SQL Server 2014 on an Azure Virtual Machine. I created a bacpac file of the Azure SQL Database.
Upon trying to import the bacpac into the SQL Server on the VM, I'm met with the following error:
Could not import package. Warning SQL0: A project which specifies
Microsoft Azure SQL Database v12 as the target platform may experience
compatibility issues with SQL Server 2014. Warning SQL72012: The
object [NegativeMedia_Prod_Data] exists in the target, but it will not
be dropped even though you selected the 'Generate drop statements for
objects that are in the target database but that are not in the
source' check box. Warning SQL72012: The object
[NegativeMedia_Prod_Log] exists in the target, but it will not be
dropped even though you selected the 'Generate drop statements for
objects that are in the target database but that are not in the
source' check box. Error SQL72014: .Net SqlClient Data Provider: Msg
7738, Level 16, State 2, Line 1 Cannot enable compression for object
'Captures'. Only SQL Server Enterprise Edition supports compression.
The way I see it, I have two options:
Upgrade SQL Server on the VM - a little scary to me based on the fact that we have existing data there. Is the upgrade process somewhat straightforward? Based on this: https://learn.microsoft.com/en-us/sql/database-engine/install-windows/upgrade-sql-server it sure looks like anything BUT straightforward.
Figure out a workaround to get this database imported into SQL Server 2014. As far as the compression part goes, I can turn that off in the Azure SQL database and recreate the bacpac file. The rest of the error message then is what I would need to "work around" but I don't fully understand its meaning.
Whichever of the two above options can be achieved in the least amount of time is what I need, in order to keep the boss happy. Please let me know if anyone has any suggestions on either.
Upgrade from SQL Server 2014 to SQL Server 2016 was a quick and painless process. It's certainly come a long way. I have upgraded and have now successfully imported the bacpac file.

SQL Azure V12 BACPAC import error: "The internal target platform type SqlAzureV12DatabaseSchemaProvider does not support schema file version '3.5'."

Today, Jan. 20, 2017, I created a BACPAC file from a SQL Azure V12 database, and when I went to import it to a local SQL Server 2014 instance using SQL Server Management Studio 2014, I got this error:
The internal target platform type SqlAzureV12DatabaseSchemaProvider
does not support schema file version '3.5'. (File: [filepath])
(Microsoft.Data.Tools.Schema.Sql)
Note that I found several similar questions to this here on StackOverflow, but none with the exact same error message or same solution. I tried installing the Microsoft® SQL Server® Data-Tier Application Framework (17.0 RC 1), but that didn't help. (If there's a newer version, I couldn't find it.)
After downloading and installing SQL Server Management Studio 2016 (v16.5.1), I was able to use that to successfully import the BACPAC file. Note that it's a 1GB download and takes 30 minutes or more to install.

Sql Azure import to localdb fails with Collation 1033 is not supported

I am getting the following error when I try to import data tier application into my local SqlServer.
Could not load schema model from package. (Microsoft.SqlServer.Dac)
Collation 1033 is not supported. You must specify one of the supported collations in the Collation attribute. (Microsoft.Data.Tools.Schema.Sql)
I have tried using Sql Server 2012 and 2014. I have uninstalled and reinstalled Visual Studio and SQL Server twice. I have managed to successfully import that .bacpac file on a different development server with no problem. I can't figure out what I'm missing here on my new development server.
Any ideas?
Here's how to fix this.
Add a key “ExtendedLocale” to the registry in the NLS folder. It can be empty.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nls\ExtendedLocale
After talking with a Microsoft Engineer this had to do with an automatic language pack removal. It was deleting that registry key for some reason. There is no way to stop the automatic language removal.

Resources