Is It a Problem?
It is a live signal more than a statistic. Its total is trivia; its presence during a shutdown that is dragging tells you a session is still running and the shutdown is waiting for it. Get Wait Statistics does not filter it out, so if it ranks, you will see it. Our SQL Server 2025 lab recorded 26 short waits in a day, totalling 12 ms.
What It Means
Microsoft’s definition: it occurs while a shutdown statement waits for active connections to exit. It only occurs when the shutdown is blocked by queries from connections logged in as an sa-level user, and if SQL Server will not shut down, at least one thread will show this wait.
When It Does Matter
During a shutdown that will not finish, for example in a patching window. Find what is still running:
SELECT
r.session_id,
s.login_name,
r.command,
r.status,
r.total_elapsed_time / 1000 AS elapsed_s
FROM sys.dm_exec_requests AS r
JOIN sys.dm_exec_sessions AS s ON s.session_id = r.session_id
WHERE s.is_user_process = 1;
Then decide per session: wait for it, or kill it and accept the rollback, which can take a while for a big transaction. For planned maintenance, stop Agent jobs and let work drain before shutting down. SHUTDOWN WITH NOWAIT skips the graceful steps and is for emergencies. The baseline to monitor is how long your planned shutdowns take.
Where To Go Next
SHUTDOWN follows shutdowns. If you are chasing a real problem, start with the waits that cost you time.
- How to Kill a SPID in SQL Server, and what rollback means for the wait.
- The waits that usually matter, ranked, with what each one is telling you.
- Performance & Troubleshooting, the scripts and guides for this part of the stack.
Leave a Reply