0
votes

I have created a SQL Server in Azure and have downloaded the Azure Data Studio. I have a SQL Server database backup file (.bak) and connected to the sever that I created from Azure Data Studio and I am not seeing an option to restore the database.

I just have the back up file available and don't have any on perm database available and I want to directly restore the database to the Azure SQL Server.

3
Is it a SQL Server in Azure or an Azure SQL Database (which is what you've tagged)? For the latter, you can't restore a .bak to them, you'd need to use a different technology such as a DACPAC and/or BACPAC.Larnu
This project on GitHub might help you: github.com/grrlgeek/bak-to-bacpacmauridb
Hi @karas27, please correct me if I understand you wrong in the answer.Joseph Xu
@JosephXu Nope was able to deploy with the approach you suggested. Thankskaras27

3 Answers

2
votes

Azure SQL database currently does not support this feature. The only way to restore a SQL database in Azure is to import from a BACPAC file as @Larnu said. You can follow this guide to use a BACPAC file to migrate to an Azure SQL database.

Another option:
If you get an account to connect to the local server.You can use SQL Management Studio to migrate it directly to Azure.
enter image description here

1
votes

You can use the Azure Data Migration Assistant to perform an assessment and migrate to Azure SQL from a local database.

0
votes

While both replies before mine are correct I want to add something.

You have 3 ways to migrate with a right click:

  1. SSMS: Task > Deploy Database to SQL Azure , which will create a BACPAK file, not a .bak file.
  2. DMA: Assess and migrate
  3. Azure Data Studio: I discovered in this video at minute 00:35 that you can actually use Azure Data Studio with some preview functionality that will help you migrate. I haven't found any plugin and in the video there is a Microsoft e-mail so I asked to try the preview. I don't expect to be better than DMA which is the go-to tool for migration.

EDIT: I sent an e-mail to Microsoft which replied to me

"Hi Francesco, Thanks for reaching out. We are currently in private preview in East US2 region. Will that work for you ? We will soon be expanding to other regions, so please stay tuned."

So one day migration through Azure Data Studio will be possible but for now it's only to East US2 region