
Introduction
Migrating a database from SQL Server to Azure SQL Database is a common cloud modernization activity. But what if the business decides to move the database back to SQL Server?
Perhaps the Azure SQL Database cost has increased, the application needs instance-level features, the organization wants to consolidate workloads, or there is a requirement to move the database to an on-premises SQL Server or SQL Server on an Azure VM.
Now imagine the database is 700 GB.
This is not a migration where you simply export a file, import it, and hope everything works. You need to consider data transfer time, target server capacity, database compatibility, ongoing data changes, and the final cutover.
In this article, we will explore the available migration methods and how to choose the right approach for a 700 GB Azure SQL Database.
1. First, understand the migration direction
Our migration scenario is:
Source: Azure SQL Database
Target: SQL Server on-premises or SQL Server on an Azure VM
This is important because many Microsoft migration tools and guides primarily focus on moving SQL Server workloads to Azure.
Azure SQL Database is a platform-as-a-service (PaaS) offering. You do not have direct access to its database files, and you cannot take a native SQL Server backup from Azure SQL Database and restore it directly to an on-premises SQL Server.
Microsoft documents BACPAC and bulk-copy approaches for moving Azure SQL Database data to SQL Server.
Before choosing a method, confirm that the source is Azure SQL Database—not Azure SQL Managed Instance. Managed Instance supports additional migration and backup/restore capabilities that are not available in Azure SQL Database.
2. What should you check before migrating 700 GB?
Before starting the migration, collect the following information.
| Area | What to check |
|---|---|
| Database size | Actual used data size, not only allocated storage |
| SQL Server version | Target SQL Server version and compatibility |
| Downtime | Maximum acceptable application outage |
| Network | Bandwidth between Azure and the target environment |
| Target storage | Data and log disk performance and capacity |
| Database objects | Features and objects that may not be supported on the target |
| Data changes | Whether the source database will continue receiving writes |
| Security | Logins, users, permissions, encryption, and credentials |
| Recovery | Backup and restore strategy for the target SQL Server |
A 700 GB database might contain large historical tables, indexes, or unused allocated space. Identify the actual amount of data that needs to be moved.
Also, do not assume that the target SQL Server needs only 700 GB of storage. You must account for indexes, transaction log growth, tempdb, backups, and future growth.
3. Migration Method 1: BACPAC export and import
A BACPAC file contains database schema and table data. It is a logical export, not a native SQL Server backup.
The basic process is:
- Export the Azure SQL Database to a BACPAC file.
- Transfer the file to a location accessible by the target SQL Server.
- Import the BACPAC into SQL Server.
- Validate the database and application.
- Redirect the application to the target.
Example using SqlPackage
Export the database:
SqlPackage /Action:Export \
/SourceConnectionString:"<Azure SQL connection string>" \
/TargetFile:"D:\Migration\SalesDB.bacpac"
Import the BACPAC into SQL Server:
SqlPackage /Action:Import \
/SourceFile:"D:\Migration\SalesDB.bacpac" \
/TargetConnectionString:"<SQL Server connection string>"
Use a current SqlPackage version and review the supported parameters for your environment. Store credentials securely rather than placing passwords in scripts or command history.
Is BACPAC suitable for 700 GB?
It can be used, but it should not be your automatic first choice.
Consider the following:
- Export and import can take a significant amount of time.
- The database must be transactionally consistent for the export.
- Large tables without clustered indexes can make exports slower or less reliable.
- Export/import consumes Azure SQL Database resources.
- Import requires sufficient local disk space and target resources.
- Schema or data-type differences may cause import errors.
Microsoft documents a maximum BACPAC file size of 200 GB when exporting to Azure Blob Storage. For larger exports, use SqlPackage to export to local storage. Microsoft also recommends SqlPackage for database imports above 150 GB to avoid certain portal import limitations.
When should you choose BACPAC?
Choose BACPAC when:
- The application can tolerate a planned outage.
- You can stop writes during the final export.
- The export and import have been tested successfully.
- You do not need continuous synchronization.
- The database schema is compatible with the target SQL Server.
For a 700 GB database, perform a complete test export and import before scheduling production cutover.
4. Migration Method 2: Bulk copy using BCP or Azure Data Factory
Instead of exporting the entire database into one BACPAC file, you can move data table by table.
Possible tools include:
- BCP (Bulk Copy Program)
- Azure Data Factory
- SSIS
- Custom scripts using bulk-copy APIs
The general approach is:
- Create the target database schema.
- Identify the largest tables.
- Copy data in batches.
- Load tables in parallel where appropriate.
- Rebuild or create indexes.
- Validate the data.
Why bulk copy can be useful
A 700 GB database may contain a few very large tables and many smaller tables.
Bulk copy gives you more control over:
- Table-level migration
- Batch size
- Parallel loading
- Data transformation
- Selective migration
- Restarting failed table loads
For example, you might migrate a 300 GB historical transaction table separately from smaller application tables.
However, bulk copy is primarily a data movement technique. You still need to migrate schema objects, security, application dependencies, and other database components.
When should you choose bulk copy?
Choose this approach when:
- You can tolerate downtime or have a separate incremental synchronization plan.
- You need control over table-level migration.
- You want to migrate selected tables.
- You need to transform or filter data.
- A single BACPAC export/import is not suitable for your environment.
For a large database, bulk copy can be a practical option, but the migration design must include data consistency and validation.
5. Migration Method 3: Initial bulk copy + incremental synchronization
For a 700 GB production database that must remain online during most of the migration, this is often the approach I would evaluate first.
The idea is simple:
Move the majority of the data while the application is online, then synchronize the remaining changes during a short cutover window.
The migration has two phases.
Phase 1: Initial data load
Copy the existing 700 GB data set to SQL Server using BCP, Azure Data Factory, SSIS, or another suitable bulk-copy process.
During this phase, the application continues using Azure SQL Database.
Because the source database is still receiving inserts, updates, and deletes, the target will become stale unless you capture and apply those changes.
Phase 2: Incremental synchronization
Use a supported change-tracking approach to identify changes made after the initial copy.
Possible approaches include:
- Azure SQL Database Change Tracking
- Azure SQL Database Change Data Capture (CDC)
- Application-level change tables
- A reliable watermark column, where the application design supports it
Change Tracking and CDC are not interchangeable.
Change Tracking identifies which rows have changed and is useful when the migration process can retrieve the current row values from the source.
CDC captures change information, including changed data, and can be useful when the migration requires more detailed change records.
The incremental process must correctly handle:
- Inserts
- Updates
- Deletes
- Primary keys
- Transaction ordering
- Change retention
- Duplicate processing
- Failed batches and retries
Do not assume that simply enabling Change Tracking or CDC automatically creates a complete migration pipeline. You still need to design and test the extraction and application process.
Important consideration: retention
If you use Change Tracking or CDC, make sure the retention period is long enough for the migration process.
If changes are cleaned up before they are applied to the target, you may lose the ability to synchronize correctly and need to reinitialize the affected data.
Final cutover
Once the initial load is complete:
- Stop application writes to Azure SQL Database.
- Apply all remaining changes to SQL Server.
- Validate that the source and target are synchronized.
- Complete application and database checks.
- Redirect the application to SQL Server.
- Monitor the application and database after cutover.
This approach can reduce downtime significantly, but it requires more planning and testing than a simple BACPAC migration.
6. Can transactional replication be used from Azure SQL Database to SQL Server?
This is a common question.
Azure SQL Database supports transactional replication as a subscriber in supported configurations. It cannot act as a transactional replication publisher.
Therefore, you cannot simply configure Azure SQL Database as a publisher and SQL Server as a subscriber to replicate the 700 GB database back to SQL Server.
This is an important difference from a traditional SQL Server-to-SQL Server migration.
For a reverse migration from Azure SQL Database, evaluate Change Tracking, CDC, or another supported incremental data synchronization design instead.
7. How long will it take to move 700 GB?
Migration duration depends on the effective data transfer rate, not only the database size.
A simple theoretical calculation:
| Effective transfer rate | Approximate time for 700 GB |
|---|---|
| 20 MB/sec | 9.7 hours |
| 50 MB/sec | 3.9 hours |
| 100 MB/sec | 1.9 hours |
These are idealized transfer estimates using decimal GB and MB. Actual migration time will be higher because of:
- Query and extraction overhead
- Network latency
- Index creation
- Transaction log generation
- Target disk performance
- Data conversion
- Resource limits
- Validation
For example, if the target SQL Server is writing data and building indexes at the same time, the effective throughput may be much lower than the network bandwidth.
Run a representative pilot migration and measure the actual throughput before estimating the production cutover window.
8. Don’t forget schema and feature compatibility
Azure SQL Database and SQL Server share the SQL Server database engine, but they are not identical environments.
Review the following before migration:
- Compatibility level
- Data types and collations
- Database-scoped configurations
- Users and permissions
- External dependencies
- Database-level features
- Application connection settings
Azure SQL Database does not include all instance-level SQL Server features. If the application relies on SQL Agent, linked servers, server-level logins, or other instance-level capabilities, plan how these will be implemented on the target.
Also check whether the target SQL Server version supports every feature used by the source database.
A successful data import does not automatically mean the application will work correctly.
9. Migration validation checklist
Before declaring the migration complete, validate the following:
Data validation
- Compare row counts for critical tables.
- Validate key business totals.
- Check for missing or duplicate records.
- Compare data across important date ranges or partitions.
- Verify that deletes and updates were applied correctly.
Database validation
- Check database integrity.
- Verify indexes and constraints.
- Confirm that required stored procedures, views, and functions exist.
- Validate permissions and database users.
- Check database compatibility and configuration.
Application validation
- Test application connectivity.
- Run critical business transactions.
- Validate reports and integrations.
- Monitor query performance.
- Confirm that the application is using the intended SQL Server instance.
Do not rely only on row counts. Two tables can have the same number of rows and still contain different data.
10. Which migration method should you choose?
Here is my practical recommendation.
| Requirement | Recommended approach |
|---|---|
| Planned downtime is acceptable | BACPAC or bulk copy |
| Database is large and tables need separate handling | BCP or Azure Data Factory |
| Application must remain online during initial migration | Initial bulk copy + incremental synchronization |
| Need to migrate only selected tables | Bulk copy or a custom pipeline |
| Source is Azure SQL Managed Instance | Evaluate its specific backup, restore, and link migration options separately |
For a 700 GB Azure SQL Database, I would not begin with a production BACPAC export without first testing its duration and reliability.
If the business can accept a long outage, BACPAC or bulk copy may be sufficient.
If downtime must be short, I would design an initial bulk load followed by incremental synchronization using Change Tracking or CDC, then perform a controlled cutover.
Final thoughts
Migrating a 700 GB Azure SQL Database back to SQL Server is not just a data-copy exercise.
The migration method should be selected based on:
- Database size and structure
- Acceptable downtime
- Network and storage performance
- Change synchronization requirements
- Target SQL Server compatibility
- Recovery and validation requirements
The most important lesson is this:
For a large database, move the data in a controlled way, synchronize the changes, and validate the target before switching the application.
A successful migration is not the one that copies 700 GB the fastest. It is the one that delivers a consistent, tested, and production-ready database with an acceptable business outage.
Discover more from Technology with Vivek Johari
Subscribe to get the latest posts sent to your email.



