Is there any query to find all SQL services currently running on the server including SSRS, SSIS, SSAS?
Asked
Active
Viewed 1,011 times
3 Answers
2
The DBATools PowerShell module is very useful for such tasks.
You can use Get-DbaService function from DBATools to get list of SQL related services installed on one or more servers.
Get-DbaService -ComputerName YourServer
1
If xp_cmdshell is enabled you could run this.
CREATE TABLE #WindowsSvc (results VARCHAR(MAX));
INSERT INTO #WindowsSvc
EXEC xp_cmdshell 'net start'
SELECT results FROM #WindowsSvc WHERE results LIKE '%SQL Server%'
nkdbajoe
- 194
- 2
- 13
0
If you are OK to use xp_cmdshell you can call tasklist which shows running processes and their process_ids
exec xp_cmdshell "tasklist /FO TABLE"
Stephen Morris - Mo64
- 4,656
- 1
- 10
- 18