SQL Flow Field Guide

sp_server_diagnostics

Catalog support for SQL Server 2022 (16.x) and 2025 (17.x)

spserverdiagnostics captures diagnostic data and health information about SQL Server to detect potential failures.

What changes

Input
Not stated in the Microsoft summary.
Output or change
Not stated in the Microsoft summary.

Syntax at a glance

sp_server_diagnostics [ @repeat_interval = ] 'repeat_interval'
[ ; ]

Work example

spserverdiagnostics captures diagnostic data and health information about SQL Server to detect potential failures.

Read the warning and prerequisites. Describe the supported maintenance context without running the procedure.

Check your work When does Microsoft support using this internal procedure?

Open Microsoft Learn for full syntax, permissions, and details for your version.