{{announcement.body}}
{{announcement.title}}

Import Local SQL Server Database to Azure: Pick the Best Method

DZone 's Guide to

Import Local SQL Server Database to Azure: Pick the Best Method

In this post, we will discuss two different approaches for the migration from on-premises SQL Server to Azure SQL database.

· Database Zone ·
Free Resource

It is not unknown to SQL users that some of the SQL Server versions have become outdated. This is the main reason why most of the SQL Server users are migrating to Azure. Along with this, many are also moving to Azure due to its unique features. If you are switching platforms, you may also need to import the local SQL Server database to Azure. In this post, we will discuss two different approaches for the migration from on-premises SQL Server to Azure SQL database.

"Hello, all. I am writing here as I am in need to know the method to import data from SQL server to Azure. I have tried moving the database using the manual method, but that was unsuccessful as various issues came up. Please suggest me some effective method to perform this database migration smoothly and successfully."

Techniques for Migrating SQL Server Database to Azure

There are different methods that will allow users to move their database to Azure. But not all of them are equally fruitful. To help our readers, we will talk about two methods in this post. One is manual and another one is automated. 

Manual Method to Import Local SQL Server Database to Azure

If users want to move their database manually, they can use the Deployment Wizard of SQL Server Management Studio (SSMS). This method should be used when the cloud migration process is not being hampered by any code compatibility problems. To start the migration in this method, run SQL Database Deployment Wizard on SSMS of any SQL Server instance.

Working Steps for Migrating SQL Server Database to Azure

1. Select the database name from SSMS.

2. Right-click on it and select Tasks >> Deploy Database to Microsoft Azure SQL Database.

3. Fill in required Deployment Settings like Server connection, database name, the maximum size of the database, Azure SQL version, etc. Click Next.

4. Review the summary of the Settings and click on Finish.

5. Wait till the wizard finishes database validation, BACPAC file creation, and use Azure SQL for database creation.

6. When the process is completed, the new database has been created in the SQL Azure server.

Automated Method to Move Local SQL Database to Azure

If you think the manual method is time-consuming and requires a lot of attention, you can choose to use SQL Server to Azure Database Migrator Software. This application will allow you to seamlessly import the local SQL Server database to Azure. Here are the complete working steps for the migration from on-premises SQL Server to Azure SQL database:

Step 1: Download and install the software on the Windows system.

Step 2: Launch the tool and click on the Open button.

Step 3: If the database is corrupt, choose Advance Scan mode. Otherwise, choose Quick Scan.

Step 4: Select the SQL Server version of the database. If you do not know the version, choose the Auto-detect option as pointing out the wrong version will cause trouble.

Step 5: For adding the NDF file of the database, select the NDF Options tab. Either manually select the NDF file or let the tool choose automatically. Make sure the NDF file is associated with the chosen MDF file.

Step 6: When file addition is done, users will be given a summary of the MDF file. If they want, they can also save the scan result for the future.

Step 7: Complete database records of MDF file including Tables, Triggers, Views, Stored Procedures, Keys, Indexes, Columns can be previewed. Click on the Migrate button to import the database in Azure.

Step 8: Add Azure Database details and login credentials. Click on Connect and wait for the green tick mark.

Step 9: Select the destination database name from the list.

Step 10: On the left side of the tool, mark the database components you wish to move to Azure SQL Database.

Step 11: Also, select whether to transfer "With schema" or "With schema & data." If required, users can also migrate deleted records.

Step 12: Click on Migrate and the software will successfully import the local SQL Server database to Azure SQL Server database.

Final Words

Azure is gradually becoming a popular platform for SQL. Therefore, many people are migrating SQL Server to Azure. To meet their requirements, we have shared guidelines for two different techniques to perform this database migration. Users can go through the steps and choose the one they find most useful. Since the software can import local SQL Server database to Azure in a short and simple manner, most of the users prefer this one over the manual method.

Topics:
database ,tutorial ,sql server ,azure ,migrating sql derver to azure

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}