Tuesday, September 1, 2020

Export / Import Existing Database to Azure SQL


 Export :

- Using SSMS SQL Server Management Studio:

   - Right Click the DB >>  Tasks >>  Export Data-Tire Application 

   - You will get your BACPAC File.

Import :

   - Upload the BACPAC File to Azure Storage account 

   - Open Azure portal >> SQL servers >> Click your Target Server >> in top toolbar select "Import database"

      >> Select the uploaded BACPAC File from the storage account 

To monitor import progress:

 - Open the database server page >> Settings >> Click select Import/Export history.

 - Or Click the Notifications icon in the top bar 

Info & Limitation :

In Azure, you cannot restore the BACPAC file into an existing database.

As WorkAround:

- You have to restore with a different name.

- Delete old database

- Rename the new one to the old database name.


Create Azure SQL Staging | Testing Database :

Checkout: http://blog.mohnady.com/2020/08/create-azure-sql-staging-testing.html


No comments: