25 September,2024 by Tom Collins
Question: Is there a way to check SQL Server services related details - such as process id , last start up time ?
Answer: Use the sys.dm_server_services . According to the Microsoft dopcumentation the prurpose of this DMV are :
"Returns information about the SQL Server, Full-Text, SQL Server Launchpad service (SQL Server 2017 (14.x) and later versions), and SQL Server Agent services in the current instance of SQL Server. Use this dynamic management view to report status information about these services."
SELECT d_s_s.servicename, d_s_s.startup_type_desc, d_s_s.status_desc, d_s_s.last_startup_time, d_s_s.service_account, d_s_s.is_clustered, d_s_s.cluster_nodename, d_s_s.filename, d_s_s.startup_type, d_s_s.status, d_s_s.process_id FROM sys.dm_server_services AS d_s_s;
There are also some alternative methods for reviewing the status of SQL Server services . If you have enough privileges you could read How to check if SQL Server Agent is running using t-sql or if you're looking to use Powershell and need to check on SSAS - How to check SSAS service status with Powershell
This is only a preview. Your comment has not yet been posted.
As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.
Having trouble reading this image? View an alternate.
Posted by: |