How to Identify Process ID for SQL Server Services? – Interview Question of the Week #185

Question: How to Identify Process ID for SQL Server Services?

Answer: I was recently asked this question during the Comprehensive Database Performance Health Check. Let us see a quick script which returns the process id for SQL Server Services.

SELECT ServiceName, status_desc,
process_id, last_startup_time, service_account
FROM sys.dm_server_services

When you run above script you will get information like service status, process Id, last startup time and service account. Let us see the result of the query ran above.

Well, that’s it for today’s blog post. Here are few of the previous interview questions, please do not miss to read them.

Reference: Pinal Dave (https://blog.SQLAuthority.com)

Menu
Exit mobile version