Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.
October 20, 1999
A. A couple of methods :-
1. Write your own XP to call the NT service API's.
2. Capture and test the NET START output via xp_cmdshell. Example below tests for SQL Agent -
CREATE TABLE #List(Description Char(255))
INSERT INTO #List
EXEC XP_CMDSHELL 'NET START'
IF EXISTS
(SELECT * FROM #List WHERE Description LIKE '%SQLServerAgent%')
You May Also Like