Azure Database Migration Service Tutorial
Introduction
Azure Database Migration Service (DMS) is a fully managed service designed to enable seamless migrations from multiple database sources to Azure data platforms with minimal downtime. This tutorial will guide you through the process of using Azure DMS from start to finish.
Prerequisites
Before you begin, ensure you have the following:
- An active Azure subscription.
- Source and target database connection information.
- Azure SQL Database or Azure SQL Managed Instance as the target database.
Step 1: Create an Azure Database Migration Service Instance
To create an instance of Azure DMS, follow these steps:
- Log in to the Azure portal.
- Click on "Create a resource" and search for "Azure Database Migration Service".
- Select "Azure Database Migration Service" and click "Create".
- Fill in the required information:
- Service name: A unique name for your migration service.
- Subscription: Select your Azure subscription.
- Resource group: Create a new resource group or select an existing one.
- Location: Choose a location close to your source or target database.
- Pricing tier: Select the appropriate pricing tier based on your needs.
- Click "Review + create" and then "Create".
Step 2: Create a Migration Project
After creating an Azure DMS instance, you need to create a migration project:
- Navigate to your Azure DMS instance.
- Click on "New Migration Project".
- Fill in the required information:
- Project name: A name for your migration project.
- Source server type: Select the type of your source database (e.g., SQL Server).
- Target server type: Select the type of your target database (e.g., Azure SQL Database).
- Choose type of activity: Select "Online data migration" or "Offline data migration" based on your preference.
- Click "Save".
Step 3: Configure Source and Target
Next, configure the source and target connections:
- In your migration project, click "Add Source".
- Fill in the source connection details:
- Server name: The name of your source server.
- Authentication type: Select the authentication type.
- Username and Password: Provide the necessary credentials.
- Click "Save".
- Click "Add Target".
- Fill in the target connection details:
- Server name: The name of your target server.
- Authentication type: Select the authentication type.
- Username and Password: Provide the necessary credentials.
- Click "Save".
Step 4: Select Databases for Migration
Select the databases you want to migrate:
- In your migration project, click "Select databases".
- Select the databases you want to migrate from the source server.
- Click "Save".
Step 5: Run the Migration
Finally, run the migration:
- In your migration project, click "Run migration".
- Monitor the migration progress and wait for it to complete.
- Once the migration is complete, verify the data in the target database.
After configuring the source and target connections, you might see an output similar to the following:
Migration started... Source: SQL Server 2017 Target: Azure SQL Database Database: SampleDB Status: In Progress
Conclusion
Congratulations! You have successfully migrated your database using Azure Database Migration Service. This tutorial covered the entire process from creating a DMS instance to configuring source and target, selecting databases, and running the migration.