Windows Server OS Upgrade Runbook for SQL Server

🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Migration & Deployment

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

A
Side-by-side, recommended for production at scale

Build the new OS on new hardware and migrate SQL Server onto it. The rollback is the old server, still running.

B
In-place Windows upgrade

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).

C
Rolling cluster upgrade

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

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;
⚠️
TLS is the one that catches people

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.

Get the runbook

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.

RUNBOOK-OsUpgrade.md


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.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *