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 platform 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
Before initiating the migration of 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.
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 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 of 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.
- Working with SQL Server Database on Microsoft Azure (Part 1)
One of the trickiest implementation for any organization is the database. They require dedicated server and someone to manage it. Cloud services such as Microsoft Azure give organizations opportunity to…
- Different Application of Joins in SQL
Structurally organized with large quantities of information, databases are the backbone of every organization. That is why companies invest in database applications such as MySQL, PostgreSQL, Microsoft SQL Server and…
- Microsoft SQL Server Execution Plan
In a database environment, certain questions related to performance pop up repeatedly: why is my query running slowly? And why is SQL Server not using the index? etc. As a…
- SQL Server – Reporting Services Migration
A while back, I got a task in my project, which was to migrate SQL Server Reporting Services from SQL 2008 to SQL 2012. Now, I had two ways of…
- SQL Server 2017 on Ubuntu Platform
Unlike previous releases of SQL Server, this time Microsoft has also given us the choice of picking the operating system on which we wish to install the application. This means…
- Column Store Index in SQL Server 2012
This post is about the new feature, i.e., Column Store Index which is available since SQL 2012 version. Microsoft has released column store index to improve the performance by 10x.…