Impact of Upgrading Secondary Node to Windows Server 2022 in SQL Server 2016 AG

The current environment is Windows Server 2016 and SQL Server 2016, with a two-node Always On availability group configured. We have now upgraded the secondary node’s OS to Windows Server 2022. What will be the impact?

Since you’re running SQL Server 2016 on a two-node Always On Availability Group setup, and you’ve upgraded the secondary node’s OS from Windows Server 2016 to Windows Server 2022, here are the potential effects and considerations:


What Will Work (Generally Safe)

  1. Always On AG Will Still Function:
    • SQL Server 2016 is supported on Windows Server 2022 (with some caveats).
    • Mixed OS in an AG (Windows Server 2016 + Windows Server 2022) is technically allowed temporarily during upgrades.
  2. No Immediate Failover Issues:
    • As long as the AG health is fine and the upgraded node has the same SQL Server 2016 version and patch level, the AG will continue functioning.
    • SQL Server uses the Windows Failover Cluster (WSFC) as its base, and mixed-OS WSFCs are supported during rolling upgrades.

⚠️ Things to Watch Out For

  1. Windows Cluster Compatibility:
    • Mixed-mode clusters (Windows Server 2016 + 2022) are only supported during upgrade and not intended to be permanent.
    • Microsoft recommends keeping all nodes on the same OS version for long-term stability and supportability.
  2. SQL Server 2016 is in Extended Support:
    • Some new Windows Server 2022 features (like TLS 1.3 or new network stack behavior) may not fully align with SQL Server 2016’s older behavior. Monitor closely.
  3. Failover Testing Required:
    • Before relying on the upgraded secondary, manually fail over to it and test all application connectivity, agent jobs, linked servers, etc.
  4. Drivers and Agent Jobs:
    • If you have integration components (SSIS, OLEDB drivers, etc.) or any SQL Agent jobs that are OS-specific, validate them on Windows 2022.
  5. Cluster Validation Tests May Warn:
    • If you run Test-Cluster, it might throw warnings due to OS version mismatch. These are expected but still worth reviewing.

  1. Patch SQL Server: Ensure SQL Server 2016 is fully patched (latest CU) on both nodes.
  2. Validate AG Health:
    • Check sys.dm_hadr_availability_replica_states for sync status.
    • Monitor dashboards in SSMS.
  3. Plan to Upgrade the Primary Node OS Soon:
    • Running a mixed-OS WSFC setup long-term is not supported.
  4. Run Failover Tests:
    • Simulate failover to the upgraded secondary.
    • Validate performance, application response, and logs.
  5. Cluster Functional Level:
    • Once both nodes are Windows Server 2022, upgrade the cluster functional level (if desired) using: Update-ClusterFunctionalLevel

Action Items

  1. Validate AG health with SELECT * FROM sys.dm_hadr_availability_group_states
  2. Check synchronization status with SELECT * FROM sys.dm_hadr_database_replica_states
  3. Monitor Windows Cluster logs for any warnings
  4. Consider running performance benchmarks on both nodes

🔄 Summary

ComponentStatus
Mixed OS in Always On✅ Temporarily supported
SQL Server 2016 on Windows 2022✅ Supported
Long-term mixed OS cluster❌ Not recommended
Failover safety⚠️ Test before production switch
Need to patch SQL✅ Strongly recommended

If you want, I can help you with PowerShell scripts or queries to test your AG health, node readiness, or assist with upgrading the primary. Just say the word!