18

I just created new SQL server database on Azure portal. My target now is to import my local database which I generated .bak file . Could you please follow me up how to import it there? I was searching over net but I see everywhere mentioning about backpacks files . How to import bak file? Is there any way? I saw that Azure SQL Database does not currently support that functionality. How to then import database and data there in most easiest way?

juvchan
  • 6,113
  • 2
  • 22
  • 35

3 Answers3

18

Unfortunately you cannot use the standard .bak file.

You are going to have to export your database to a .bacpac file. See here

and then import that .bacpac file into the azure sql server. see here

NB: Remember to add your IP address to the azure sql server firewall rules.

For more info on migrating your DB to azure see here: https://azure.microsoft.com/en-us/documentation/articles/sql-database-cloud-migrate/

Zapnologica
  • 22,170
  • 44
  • 158
  • 253
5

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

view my answer with screenshot: https://stackoverflow.com/a/41526042/908936

Community
  • 1
  • 1
razon
  • 3,882
  • 2
  • 33
  • 46
0
  1. Use the .bak file to restore a local database on your local device, if database is not already on your local device then first create the database and then use the .bak file to restore.

  2. In Microsoft SQL Management Studio in Tasks select Export Database to Azure.

That is it :)

Kbdavis07
  • 1,012
  • 13
  • 24