Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 In SQL can you check for Running Services

Author  Topic 

BobFord
Starting Member

2 Posts

Posted - 2004-11-07 : 21:03:09
I can currently obtain a list of Windows Service applications that are running on the current SQLServer computer by using the following:

CREATE TABLE #tmpServicesList (ServiceName VARCHAR(255))
INSERT INTO #tmpServicesList
EXEC master.dbo.xp_cmdshell 'Net Start'
if exists(select ServiceName from #tmpServicesList where ServiceName like '%Task Scheduler%')
begin
print 'Task Scheduler is running'
end else
begin
print 'Task Scheduler is not running'
end
select * from #tmpServicesList

drop table #tmpServicesList

However, I would like to be able to list the Services that are running on another computer in the same Domain that does not have SQLServer installed. The SQL will in a stored procedure that is called from time to time.

Any suggestions/examples would be appreciated...


Cheers

Bob

robvolk
Most Valuable Yak

15732 Posts

Posted - 2004-11-07 : 22:33:39
Please do not cross post:

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=42271
Go to Top of Page
   

- Advertisement -