Issues migrating SQL Server 2008 to Azure SQL - sql-server

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.

Related

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

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"

Restore SQL Server database from a script

I have a database stored on SQL Server with my web site at a regular windows hosting solution. I need to migrate to Azure.
The only backup mean I have is to use SQL Server Management Studio and do a Task -> Generate scripts that saves schema and data in a sql file. I did it and I got a 260Mb file.
My question is about importing that to Azure. Can I do it in Mngt Studio too? How?
Thanks
If you have exported it all to scripts, yes, you can run them against your SQL Database. However, before you do that I'd suggest looking at https://azure.microsoft.com/en-us/documentation/articles/sql-database-cloud-migrate/. It might shed some light on other options that will include verifying compatibility. The BacPac method might be better than the scripts.
To answer the specific question of using SSMS with Azure SQL DB, this article https://azure.microsoft.com/en-us/documentation/articles/sql-database-manage-azure-ssms/ shows how to make the connection.

Uploading database to Azure SQL

I need to upload an MDF file to Azure SQL. According to Is it possible to attach a MDF file to an Azure SQL database? the correct way to do this is to import the MDF to SQL Server Management Studio and then right click and export it to Azure SQL.
However all I'm getting is an error claiming that:
I have no idea what this actually means nor why I am unable to upload the database to Azure. Any suggestions?
In order to import a Database to Azure, you will need to create a BACPAC file. Instructions can be found in this MSDN blog post.
And just in case you run into it, this question has some good links for where to get the SQL Server Data Tools required to import a BACPAC from Azure. You probably need to get those installed before being able to export to BACPAC.
Update: Adding this so you can see my export options:
This message means that you will need to create a Windows VM within Azure that has a full install of SQL Server on it.
https://msdn.microsoft.com/en-us/library/azure/jj823132.aspx
Another way is using this tool.
http://sqlazuremw.codeplex.com/
It will generate the script from your local database and execute it on Azure Sql.

VB.Net data source connection error

i am using VS2008 VB.net and sql 2008.
I tried to connect a new datasource using Microsoft SQL Server Database File (SqlClient) it gives an error;
I tried to connect a new datasource using Microsoft SQL Server (SqlClient) it gives an error;
In the first instance, it appears you're attempting to attach to an active SQL Server database file that is actually being used by SQL Server and/or the permissions to the file don't grant you access to it. Either stop the local SQL Server to access the file, or find out how you would go about getting the file's permissions modified such that you can access it.
In the second instance, it sounds like an older version of the SqlClient simply doesn't support connection to database servers later than SQL Server 2005, as the error message implies. That would suggest the possibility of installing later patches/updates to get your configuration up to date.

Resources