Restoring database from Azure BACPAC gives an error - sql-server

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).

Related

Issues migrating SQL Server 2008 to Azure SQL

I'm working to migrate an existing SQL Server 2008 database (on-premises) to Azure SQL. I'm able to generate a .dacpac file using Visual Studio. When I try to import the .dacpac file into Azure SQL, I get the following error:
Operation Name: Performs a database extension operation.
Error: The storage URI is not valid.
So far, I've verified that there are no spaces in the filename & the account does have permissions.
Any pointers to resolving this issue is appreciated.
Regards,
Rajesh
Some one get the same error which caused by the .bacpac file name contains a space. Please check it you have the same problem: Ref here: Error "The storage URI is not valid" when creating a new SQL Azure database from a bacpac.
I don't what your system is, if you are use windows system, please try to use the “deploy the database to SQL Azure” option from the SQL Server Management Studio (SSMS) to deploy the local SQL database to Azure. It's much easier.
Ref this tutorial: https://developer.relatude.com/deploying-a-sql-database-to-azure-with-sql-server-management-studio.

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?

How to export (bacpac) azure database

I have one database in azure and accessing in my SQL Server Management studio and try to export the database but gives me the errors.
Here are the steps I have done:
1) Export data-tier Application
2) No of errors I got
3) Got this error in all the processes:
I am using SSMS (2014 and 2016)
Try downloading the latest version of SQL Server Management Studio in order to have the best user experience with Azure SQL Database. Please download it from here
That dss schema means you were using SQL Data Sync. You may need to use the deprovision utility to clean that remnants left by SQL data Sync.
Alternatively you can use SQLpackage, PowerShell or Azure Portal to do the same task. You can learn more about it here.
SqlPackage.exe /a:Export /tf:testExport.bacpac /scs:"Data Source=apptestserver.database.windows.net;Initial Catalog=MyDB;" /ua:True /tid:"apptest.onmicrosoft.com"

importing SQL Server .bacpac file

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.

Unable to import/deploy database to SQL Azure: "The service objective (Business/Web) specified is invalid."

I'm trying to move my databases to a newer Azure subscription. I used to simply click "Deploy to Azure" on a local database from SSMS and have it deployed to a specified Azure server. Importing/Exporting a BACPAC file also works. However, I can't seem to do any of this on the new server. I keep getting the error:
"The service objective 'Web' specified is invalid."
Googling around, I found this thread explaining the need to update the CREATE DATABASE template to accommodate Azure Databases (Azure upgrade, I'm guessing). However, the hotfix provided is specifically for SQL Server 2014 and I'm using SQL Server 2012. I checked other cumulative updates for 2012 here but found no fix for the issue.
Is there any other way I can fix this without having to upgrade to 2014?
Just to summarize my software versions:
SQL Server 2012
SQL Management Studio 11.0.2100.60
Local database: SQL Server 10.50.16000
Old Azure server: SQL Server 11.0.9230
New Azure server: SQL Server 13.0.15
You are getting this error because the latest V12 servers are not supporting the Web and Business Editions anymore. If you don't want to upgrade to SSMS 2014, you can create a V11 server and import your DB on this server. However this is only a temporary solution as Web and Business edition databases will be retired in September. At this point you will have to work with the latest tools to avoid this problem.
There is a Hotfix for it you can download and install on your machine. Please navigate to:
https://support.microsoft.com/en-gb/kb/2936603
You need to enter your email then download link will be sent to your email address. Then install it on your machine and you can see the following options:
Install the database as a Data Project into Visual Studio,
Set the target framework in the properties window to SQL Azure,
Build the project and resolve any unsupported issues.
Publish to your azure site.
I have tried the above and did not work for me - this solution worked!

Resources