Working with SQL Server Database on Microsoft Azure (Part 2)

Posted by Vivek Shankar

The huge volume of data generated around us, today, requires optimum storage and management to have any benefit for organizations. With a host of advantages that MS Azure possesses, especially relating to registering with MS Azure and create SQL databases & objects, it is one of the most preferred platforms by businesses to store and manage their data.

While in our attempt to help you understand how MS Azure can benefit your organization, we discussed the implementation of SQL Server Database on MS Azure in the previous blog. After learning how to create the database, it is imperative to learn how to migrate present, functional database on the platform. Therefore, in this blog post, we continue exploring the world of MS Azure and help you with migrating your on-premise SQL Database to MS Azure.

Migrating On-premise SQL Database to MS Azure

The following image displays the method of database migration from SQL server to MS Azure, known as Export Data-tier Application method. In this part, we will only perform the task depicted in yellow. It is the most preferred method to migrate data to MS Azure, as there is no code compatibility issue to block the database migration.

Figure 1: SQL Server migration to MS Azure

Migration Prerequisites

Before initiating the migration of the database to MS Azure, assure that:

  • You have an Azure subscription.
  • A .bacpac file (BACPAC) of the database you want to migrate. The BACPAC ultimately needs to be in an Azure storage blob container.
  • An Azure compatible database.

Database Migration

Here is a systematic guide to database migration to MS Azure.

  • Open MS SQL Server Management Studio
  • Right-click the database you want to migrate and select Export Data-tier Application as displayed below.

Figure 2: Selecting Export Data-tier Application in MSSQL SMS

  • The selection will open a wizard that will allow you to export schema and data to BACPAC file format. Save the file in an Azure Blob Storage Account. Select the container and click next. The following four images (Figure 3 to 6) illustrates these steps.

Figure 3: Saving window for the exporting data-tier


Figure 4: Selecting the container to save the database


Figure 5: Verification screen of Source & Destination


Figure 6: A complete list of items successfully exported


On successful completion of the process, you will see a list of items with “Success” in the result column; otherwise, you will need to resolve some issues to make the database capable of being converted into an Azure SQL Database.

  • Now, connect to the Azure portal and select the SQL Server location to create the database and click Import Database Complete the required steps, including the BACPAC file location, pricing tier, server administrator’s password and click OK (the process is illustrated in the following three images; Figure 7 to 9).


Figure 7: The MS Azure portal to select the SQL Server location and import button to import the database


Figure 8: Selecting the database backup to import


Figure 9: Filling the details to initiate the import of the database

  • On successfully completing the process, you will see a migrated database in the list.

Figure 10: Successfully migrated SQL database in the list of MS Azure databases


You can easily select the database to work on from the list of databases available on your MS Azure portal.

We hope this simple technique of migrating SQL database to MS Azure will make you more confident about adopting the platform for your business and reap its benefits.

In the next part, we will see another useful way of migrating on-premise SQL Database to MS Azure. Until then, happy learning!

Please let us know your thoughts by commenting below.

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *