Applies to: SQL Server Azure SQL Database
In this guide, you learn how to migrate your SQL Server instance to Azure SQL Database.
Complete pre-migration steps before continuing.
MigrateAfter you complete the steps for the pre-migrationâ¯stage, you're ready to perform the schema and data migration.
Migrate your data using your chosen migration method.
Migrate using the Azure SQL migration extension for Azure Data StudioTo perform an offline migration using Azure Data Studio, follow the high-level steps below. For a detailed step-by-step tutorial, see Tutorial: Migrate SQL Server to Azure SQL Database (offline).
When using migration options that continuously replicate / sync data changes from source to the target, the source data and schema can change and drift from the target. During data sync, ensure that all changes on the source are captured and applied to the target during the migration process.
After you verify that data is same on both the source and the target, you can cut over from the source to the target environment. It's important to plan the cutover process with business / application teams to ensure minimal interruption during cutover doesn't affect business continuity.
Migrate using transactional replicationWhen you can't afford to remove your SQL Server database from production while the migration is occurring, you can use SQL Server transactional replication as your migration solution. To use this method, the source database must meet the requirements for transactional replication and be compatible for Azure SQL Database. For information about SQL replication with availability groups, see Configure replication with Always On availability groups.
To use this solution, you configure your database in Azure SQL Database as a subscriber to the SQL Server instance that you wish to migrate. The transactional replication distributor synchronizes data from the database to be synchronized (the publisher) while new transactions continue.
With transactional replication, all changes to your data or schema show up in your database in Azure SQL Database. Once the synchronization is complete and you're ready to migrate, change the connection string of your applications to point them to your database. Once transactional replication drains any changes left on your source database and all your applications point to Azure SQL Database, you can uninstall transactional replication. Your database in Azure SQL Database is now your production system.
Tip
You can also use transactional replication to migrate a subset of your source database. The publication that you replicate to Azure SQL Database can be limited to a subset of the tables in the database being replicated. For each table being replicated, you can limit the data to a subset of the rows and/or a subset of the columns.
Transaction replication workflowImportant
Use the latest version of SQL Server Management Studio to remain synchronized with updates to Azure and SQL Database. Older versions of SQL Server Management Studio can't set up SQL Database as a subscriber. Get the latest version of SQL Server Management Studio.
Some tips and differences for migrating to SQL Database
To speed up migration to Azure SQL Database, you should consider the following recommendations:
Resource contention Recommendation Source (typically on premises) The primary bottleneck during migration from the source is data file I/O and latency, which needs to be monitored carefully. Based on data file I/O and latency, and depending on whether it's a virtual machine or physical server, you might have to engage your storage admin and explore options to mitigate the bottleneck. Target (Azure SQL Database) The biggest limiting factor is the log generation rate and latency on your database log file. With Azure SQL Database, you can get a maximum log generation rate of 96 MB/s. To speed up migration, scale up the target Azure SQL database to Business Critical Gen5 8 vCore to get the maximum log generation rate of 96 MB/s, which also provides low latency for log files. The Hyperscale service tier provides a log rate of 100 MB/s regardless of chosen service level. Network The network bandwidth needed is equal to the maximum log ingestion rate 96 MB/s (768 Mb/s) Depending on network connectivity from your on-premises data center to Azure, check your network bandwidth (typically Azure ExpressRoute) to accommodate for the maximum log ingestion rate.You can also consider these recommendations for best performance during the migration process.
After you have successfully completed theâ¯migrationâ¯stage, go through the following post-migration tasks to ensure that everything is functioning smoothly and efficiently.
The post-migration phase is crucial for reconciling any data accuracy issues and verifying completeness, as well as addressing performance issues with the workload.
Update statisticsUpdate statistics with full scan after the migration is completed.
Remediate applicationsAfter the data is migrated to the target environment, all the applications that formerly consumed the source need to start consuming the target. Accomplishing this will, in some cases, require changes to the applications.
Perform testsThe test approach for database migration consists of the following activities:
Be sure to take advantage of the advanced cloud-based features offered by SQL Database, such as built-in high availability, threat detection, and monitoring and tuning your workload.
Some SQL Server features are only available once the database compatibility level is changed to the latest compatibility level.
To learn more, see managing Azure SQL Database after migration.
Resolve database migration compatibility issuesYou might encounter a wide variety of compatibility issues, depending both on the version of SQL Server in the source database and the complexity of the database you're migrating. Older versions of SQL Server have more compatibility issues. Use the following resources, in addition to a targeted Internet search using your search engine of choices:
Important
Azure SQL Managed Instance enables you to migrate an existing SQL Server instance and its databases with minimal to no compatibility issues. See What is Azure SQL Managed Instance?
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4