Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Restoring SQL Server backup to Azure SQL Database

Is there a way to simply take a SQL backup .bak file, and using that as a restore point to generate a new database on Azure SQL Database?

The wizard that I see generally recommended in this situation wants to create a custom file to use, but it pukes on the encrypted objects ( functions and views ) and I don't see another way to get it going.

like image 824
Neo Avatar asked Oct 30 '15 12:10

Neo


People also ask

Can we restore SQL Server backup in Azure SQL Database?

Currently Azure doesn't support restoring the database on Azure SQL Instance using the backup (. bak) file. But there are many other ways to migrate the SQL Database to Azure SQL. For example, using the SQL Server Management Studio deploy mention or by taking the backup in the .

How do I import a .BAK file into an Azure SQL Database?

bak file that is in an Azure File Share, attach that File Share to an Azure Container Instance running SQL Server, restore the . bak, create the . bacpac, copy it to Azure Blob Storage, and then import it into an Azure SQL Database.


2 Answers

If you already have a database on local machine then you can migrate it directly on Azure using SQL Management Studio. Follow these steps:

Right click on the database name in SSMS: mssms

Follow the wizard that appears then.

If you're running SSMS v17 you can configure the Azure SQL database edition, size and service objective.

like image 149
razon Avatar answered Sep 26 '22 02:09

razon


Azure SQL Database does not currently support that functionality. The only method to restore in Azure SQL Database is import from BACPAC files - you can migrate to Azure SQL DB using BACPAC files by following this guide: https://azure.microsoft.com/en-us/documentation/articles/sql-database-cloud-migrate/

The other options is to use SQL Server in a VM, which would enable a restore of a .bak file

like image 28
Joseph Idziorek Avatar answered Sep 25 '22 02:09

Joseph Idziorek