0% found this document useful (0 votes)
24 views

Migrate SQL Database To Azure SQL Server by Using BACPAC

Uploaded by

samrout58
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

Migrate SQL Database To Azure SQL Server by Using BACPAC

Uploaded by

samrout58
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Srinivas Merugu

www.linkedin.com/in/srinivas-merugu-dba-azure

Migrate On-Prem SQL database to Azure SQL Server by using BACPAC


BACPAC ( Backup package) consists of schema and data for SQL Server tables. We will export
the database table into BACPAC and refresh in Azure SQL server for developers to develop code
before implementing into Production environment or else want move complete application and
database table to Azure SQL server.

By Using the export data-tier application option on the on-premises database, we can export
to BACPAC. Import the BACPAC as an Azure SQL Database using the Azure portal or else import the
BACPAC file using SSDT, sqlpackage.exe, or SSMS.

Prerequisite:

1. Database compatibility.
2. Azure subscription and Azure SQL server.
3. BACPAC file of On-Prem Database.
4. Azure storage blob container if you want keep BACPAC in container or else will import from
accessible location.

We will migrate database from On-prem to azure by using below steps.

1. Generate BACPAC file by using Export Data-Tier Application


2. Import BACPAC file to Azure SQL server

Generate BACPAC file by using Export Data-Tier Application


1. Right click on Database -> Task -> Export data-tier Application.

1
Srinivas Merugu
www.linkedin.com/in/srinivas-merugu-dba-azure

2. Click next

3. Select save to local disk-> Browse

2
Srinivas Merugu
www.linkedin.com/in/srinivas-merugu-dba-azure

4. Provide the path and give the file name

5. Select Save to local Disk->Click next


If you select “Save to Microsoft Azure” then need to provide Azure Storage account and
Container Details.

3
Srinivas Merugu
www.linkedin.com/in/srinivas-merugu-dba-azure

6. In advanced, Select all schema and tables-> Click Next

7. Click finish

4
Srinivas Merugu
www.linkedin.com/in/srinivas-merugu-dba-azure

8. BACPAC has completed-> click Close

Import BACPAC file to Azure SQL server


9. Connect to Azure SQL server

5
Srinivas Merugu
www.linkedin.com/in/srinivas-merugu-dba-azure

10. Right click on database-> Import Data-tier Application

11. Click next

6
Srinivas Merugu
www.linkedin.com/in/srinivas-merugu-dba-azure

12. Select import from disk-> browse.


If BACPAC file is located in Blob container then select “Import from Windows Azure” and
provide storage account, container and BACPAC file name.

13. Select location

7
Srinivas Merugu
www.linkedin.com/in/srinivas-merugu-dba-azure

14. Click next

8
Srinivas Merugu
www.linkedin.com/in/srinivas-merugu-dba-azure

15. Click finish

16. Validate Migrated database and confirm to application team to check.

You might also like