Upgrading the operating system underneath SQL Server is usually driven by someone else: a support deadline, a security policy, a hardware refresh. That does not make it someone else’s problem, because SQL Server is the thing that will be blamed if it comes back wrong.
There are 3 approaches, and the right one depends mostly on whether the instance is clustered.
Choosing the Approach
Build the new OS on new hardware and migrate SQL Server onto it. The rollback is the old server, still running.
Faster, fewer moving parts, and the rollback is a restore. Needs a supported upgrade path, a SQL Server version that is supported on the new OS, and a verified backup before you start. Windows Setup’s in-place upgrade is for servers that are not clustered (Microsoft’s in-place upgrade guide).
For a WSFC running an AG or FCI. Upgrade the passive nodes first, fail over onto an upgraded node, then upgrade what used to be the primary, and update the cluster functional level at the end. It moves 1 OS version at a time, Microsoft recommends finishing within 4 weeks, and the functional level change cannot be undone (cluster OS rolling upgrade).
Network Pre-Flight
This applies to the side-by-side approach, which is a migration underneath. In-place and rolling cluster upgrades keep their hosts and their firewall rules. Run these days before the window, from the machines that will actually make the connections.
- Port 1433 to the target from the source server, from every application server, and from your own workstation:
Test-NetConnection new-server -Port 1433. A named instance needs its fixed port instead, plus UDP 1434 if clients rely on the Browser service. Walkthrough: testing remote port connectivity with PowerShell. - Port 445 to the backup share, from both sides. The source writes the backups and the target restores them, so test the share from each server, not just the one you happen to be logged into.
- Firewall rules in both directions on the new host. Inbound 1433 is the rule everyone remembers; outbound to the backup share, monitoring, and any linked servers is the one that turns up mid-window. Reference: SQL Server default ports.
- Line of sight from the applications, before cutover. Every app server and VM that will connect must reach the target before the window opens, tested from those machines rather than from the DBA workstation. A connection that fails at pre-flight is a task; the same failure after cutover is an incident.
- After cutover: DNS and SPNs. Repoint the CNAME and respect the TTL, because clients keep the old record for exactly as long as you told them to. Then re-register the SPNs for the new host so Kerberos keeps working; miss that and connections either fall back to NTLM quietly or fail with the pre-login handshake error.
The In-Place Sequence
- Confirm your SQL Server version is supported on the target OS. Windows Server 2025 supports SQL Server 2019, 2022 and 2025; SQL Server 2017 stops at Windows Server 2022 (Microsoft’s SQL Server and Windows compatibility matrix). Get Version and Edition tells you which you have.
- A full health check and a verified database backup before anything starts
- Confirm the .NET Framework requirements for your SQL Server version: SQL Server 2025 needs .NET Framework 4.7.2 (hardware and software requirements)
- Stop SQL Server Agent, which is recommended rather than required, but makes the restart predictable. Enable or Disable All SQL Agent Jobs keeps the jobs quiet until you put them back.
- Run the Windows Server upgrade
- Validate SQL Server afterwards, then check Windows features and TLS settings. If the service will not come back, the error log has the reason.
- Start Agent, verify the jobs with Get SQL Agent Job Overview, and finish with a health check
The first two checks after the restart fit in one read-only query: the operating system SQL Server now reports, and whether its services came back running with the startup type they had before.
-- After the OS upgrade: the operating system SQL Server now reports
SELECT host_platform,
host_distribution,
host_release
FROM sys.dm_os_host_info;
-- And whether the SQL Server services came back with the right startup type
SELECT servicename,
status_desc,
startup_type_desc,
service_account,
last_startup_time
FROM sys.dm_server_services;
Windows Server 2025 turns TLS 1.0 and 1.1 off by default (Microsoft’s deprecated features list). SQL Server 2016 and later support TLS 1.2 natively, so the engine is rarely the problem; old client drivers and .NET-based features such as Database Mail are (TLS 1.2 support for SQL Server). The symptom is applications that cannot connect at all, which looks like a much bigger problem than a protocol setting. Check it as part of the upgrade, not after the phone rings, and confirm the connections are still encrypted with the connection encryption check.
The full version, with every command, is in the repo. Includes the SQL Server and Windows Server compatibility matrix, the supported in-place paths, the rolling cluster procedure and the key gotchas.
Frequently Asked Questions
Is an in-place Windows upgrade safe under SQL Server?
It is supported on specific paths, and two checks decide it: the Windows upgrade path itself, and whether your SQL Server version is supported on the new OS at all. Windows Server 2025 starts at SQL Server 2019. What makes it risky is not the upgrade itself but doing it without a verified backup and a rollback you have thought through.
Do I need to stop SQL Server first?
The upgrade will handle the services, but stopping Agent first is recommended so jobs do not fire during the restart sequence and leave you diagnosing two problems at once.
What order do I upgrade cluster nodes in?
Passive nodes first. Pause the node, drain its roles, upgrade it, bring it back, then fail over onto it before touching the node that was primary.
What should I check immediately afterwards?
That SQL Server started, that clients still connect over TLS 1.2, that Agent jobs are running, and then a full health check. In that order, because each one rules out a class of problem.
Related
The OS upgrade is one half of the window. These cover the SQL Server half and the alternatives to doing it in place.
- SQL Server Version Upgrade Runbook, the SQL Server side of the same maintenance window
- SQL Server Migration Runbook: Standalone, the alternative to an in-place OS upgrade, which is to move the instance
- SQL Server Migration Runbook: Availability Groups and Clusters, moving a clustered instance to new nodes instead
- SQL Server Builds: Complete Version List and Support Lifecycle, when SQL Server falls out of support, which often sets the same deadline
- SQL Server Change Management, the change order, and the rollback you need agreed before you start
- DBA Scripts: The Complete Guide
Leave a Reply