Export Azure SQL Database

This Azure tutorial will discuss multiple approaches to export Azure SQL Database.

Export Azure SQL Database To bak File

Here, we will discuss two approaches to exporting the Azure SQL database to a bak file.

Approach-1

To export Azure SQL Database, follow the below steps.

  1. Log in to the Azure Portal (https://portal.azure.com/).
  2. Search for the SQL Database and then click on the search result SQL databases.
Export Azure SQL Database

3. Now you can see the list of Azure SQL databases that you have created. Click on the Database you want to export as a .bak file.

4. On the SQL Database page, click on the Export button as shown below.

azure sql database export

5. On the Export Database window, provide the below details

  • File name: Provide the file name.
  • Subscription: You must provide a valid Azure subscription for the use you want here.
  • Storage: Click on the Configure Required Settings option to select the storage account and then the container.
  • Server admin login: Provide the Server admin login username here.
  • Password: Provide a valid Password.

Finally, click on the OK button.

export azure sql database to local

6. Once the export is completed, the .bacpac file will be downloaded to the Storage container you selected above.

how to export azure sql database to local sql server

7. As a next step, you need to download the .bacpac file locally. To do that, please right-click the .bacpac file, click the Download option, and save it in a local path.

how to export azure sql database

8. The next step is to create the .BAK file from the .bacpac file using the SQL Server Management Studio (SSMS). Connect to the SSMS and Right-click on the Database node –> click on the Import Data-tier Application as shown below.

export azure sql database to local sql server

9. Click on the Next button on the next page.

10. On the Import Settings tab, select the Import from local disk option, then Browse to your local path, select the .bacpac file you saved above, and click the Next button.

export azure sql database to storage account

11. On the Database Settings tab, you can provide a new name for your Database or keep the default name as it is. Leave the other options as it is. Click on the Next button.

how to export azure sql database to local sql server

12. Now, on the Summary tab, you can cross-check that all the information is correct. If you want to change anything, click the Previous or Finish buttons.

how to export azure sql database

13. It will take a few seconds to progress and show you the Operation Complete screen. In case of any error, it will show you in red. Click on each error to see more details.

14. You find the newly created database under the Database node in the SQL Server Management Studio.

15. Right-click on the new Database, select Tasks, and Click on the BackUp… option, as highlighted below.

how to export data from azure sql database

16. On the next window, click the Remove button to remove the existing path. Then click the Add button to add a new path to save the .bak file.

restore bacpac to sql server existing database

17. Once you click the Add button, select the destination path, provide the filename, and click the Ok button. It will store the file as .BAK extension.

18. You are done !!! Now, in the destination path, you will find the .bak file.

Approach-2

  1. Connect to the Azure SQL DB instance.
  2. Right-click on the Database –> Select the Tasks option –> Click on the Export Data-