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?

- 6,113
- 2
- 22
- 35
3 Answers
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/

- 22,170
- 44
- 158
- 253
-
Or use the 'SQL Azure migration wizard' to copy everything to azure – Erik Oppedijk Mar 05 '16 at 11:07
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
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.
In Microsoft SQL Management Studio in Tasks select Export Database to Azure.
That is it :)

- 1,012
- 13
- 24