Step one : check into your Azure account
Login to Azure protal : they ask for email verification , will send verification code to your email. You will need to fill the code and login.
- You can see db infos there
- DB size there
- DB server address
Options "Export" ---> Will generate db backup file .bacpac to storege account , so you need an account if want to get .bacpac file , in this case , we use another method instead of generate .bacpac. You can refer to Here for restore with .bacpac file
- Connect to Azure database
- Need to allow our computer IP when connect to Azure database from SSMS , otherwise could not connect it.
Add rules and save
Steps of getting an Azure SQL database down onto your local machine...:
- Open your Local SQL server Management Studio and connect to your Azure SQL Server.
- Select the database you would like to get down onto your local machine, and right-click...select "Generate Scripts". Follow the prompts...
BUT, be careful in that if you ALSO want the DATA, as well as the scripts, be sure to check the Advanced Options before beginning the generating...scroll down to "Types of data to script", and make sure you have "Schema and data"...or whatever is appropriate for you.
- connect to Azure database from SSMS
- right click on the db and Generate scripts
- select the objects you want to generate
- Advance settings ---> "Types of data to script", and make sure you have "Schema and data";
Please note that you may get script timeout related error due to your Network connection to Azure server is not well. To generate script for big database, please consider to use a fast network.
The last step
Run .sql file with the database on our end
- Upload .sql file to account db folder , go to control panel ---> Databases ---> Run .sql file
- Web connect to db and check if tables , views are there.