As a DBA, it is very important for all of us to make sure SQL Services are up and running.But Is there an easy way to get this information in SQL Server?
The answer is simple, yes. Microsoft has introduced a new DMVs – sys.dm_server_services. dm_server_services DMV is available right from SQL Server 2008R2 (SP1). This has made life easy for most of DBAs from writing a bunch of codes.
SELECT
SERVICENAME, STARTUP_TYPE_DESC, STATUS_DESC,
LAST_STARTUP_TIME,SERVICE_ACCOUNT,
IS_CLUSTERED ,CLUSTER_NODENAME
FROM SYS.DM_SERVER_SERVICES
Notes:
1. Login needs to be provided with VIEW SERVER STATE PERMISSION
2. Support is available for SQL Server 2008 R2(SP1) and later versions
Read Also:
SYS.DM_SERVER_SERVICES
One thought on “How to check SQL Services status in SQL Server”