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?

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

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.

Solarwinds
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.

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

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)

Solarwinds
, , , ,
Previous Post
How to Check Status of Instant File Initialization? – Interview Question of the Week #184
Next Post
What is Lock Pages In Memory? – Interview Question of the Week #186

Related Posts

Leave a Reply

Menu