Sunday, February 9, 2025

Step-by-Step Guide: Side-by-Side Migration of a 75TB SQL Server 2016 Database to SQL Server 2025 Using Always On Availability Groups Part III

If a major change is required, such as hardware upgrades, OS changes, or cluster reconfigurations, a Side-by-Side Migration is the best approach. This method minimizes risk by keeping the old system intact while setting up a new Always On Availability Group (AG) on SQL Server 2025.


🔷 Overview of the Side-by-Side Migration Process
Prepare the New SQL Server 2025 Environment
Back Up & Restore Databases to the New Server
Set Up Always On AG on the New SQL Server 2025 Cluster
Synchronize Data Between Old and New Servers
Perform Application & Performance Testing
Cut Over to the New SQL Server 2025 Cluster
Decommission the Old SQL Server 2016 Cluster

🔷 Step-by-Step Upgrade Process
🔹 Step 1: Prepare the New SQL Server 2025 Environment
✅ Provision New SQL Server 2025 Cluster

✅ Configure Windows Failover Clustering (WSFC)

✅ Enable Always On Availability Groups on New Nodes
Enable Always On at the SQL Server level and Restart SQL Server.
✅ Ensure SQL Server Service Accounts Have Proper Permissions
Provide "Log on as a service" permission.
Ensure SQL Server and Cluster service accounts have access to: Database files and WSFC cluster resources
✅ Pre-Upgrade Compatibility Checks
Run Microsoft Data Migration Assistant (DMA) to analyze the SQL 2016 database for compatibility with SQL 2025.

🔹 Step 2: Backup & Restore Databases to the New Server
✅ Take a Full Backup on SQL Server 2016 Primary Node

✅ Restore the Backup to SQL Server 2025

✅ Keep the Database in NORECOVERY Mode
This allows future log shipping from the old system to keep the new database in sync until cutover.

🔹 Step 3: Set Up Always On Availability Group on SQL Server 2025
✅ Create a New Availability Group on SQL Server 2025

✅ Join Secondary Replicas to the AG

✅ Join Databases to AG

✅ Create an AG Listener

✅ Verify AG Health

🔹 Step 4: Synchronize Data Between Old & New Servers
✅ Set Up Log Shipping from SQL Server 2016 to SQL Server 2025
Take new log backups on the old system:

Restore logs to SQL Server 2025 (repeatedly until cutover):

Automate log shipping using SQL Agent Jobs.
✅ Monitor Synchronization

✅ Ensure No Outstanding Transactions
Run DBCC OPENTRAN on SQL Server 2016 to ensure no active transactions remain.

🔹 Step 5: Perform Application & Performance Testing
✅ Configure a Staging Environment
Point test applications to the new AG listener.
Run SQL Server Profiler to compare performance between old and new environments.
✅ Test Always On Automatic Failover
Manually fail over to a secondary replica to validate:
Ensure applications remain connected.
✅ Validate Database Integrity

🔹 Step 6: Cut Over to the New SQL Server 2025 Cluster

Step 7: Decommission the Old SQL Server 2016 Cluster
✅ Monitor the New SQL Server 2025 Cluster for 24-48 Hours

No comments:

Post a Comment

MINUTE BY MINUITE PRODUCTION RUNBOOK FOR FULLY AUTOMATED MIGRATION FROM SAP ASE TO SQL Server Azure VM

MINUTE BY MINUITE PRODUCTION RUNBOOK FOR  FULLY AUTOMATED MIGRATION FROM SAP ASE TO SQL Server Azure VM --- OVERALL STRUCTURE Breaking execu...