Script: Get SQL Server Services Information

This script returns details about the SQL Server and SQL Server Agent services running on an instance. It shows the service name, process ID, startup type, current status, service account, and whether instant file initialisation is enabled.

This is a useful check when validating new builds, reviewing service accounts, or troubleshooting startup and permission-related issues.


The Script


Example Output

The result set shows one row per SQL Server–related service, including when the service last started, which account it runs under, and whether instant file initialisation is enabled.

This makes it easy to confirm service configuration and spot inconsistencies across environments.

SQL Server query showing SQL Server and SQL Agent service information

Notes

  • Useful for validating service accounts and startup configuration
  • Instant file initialisation status is visible per service
  • Helps confirm clustering and node ownership
  • Common check during server build reviews and troubleshooting

Comments

Leave a Reply

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