Wednesday, March 21, 2012

Detect (local) SQL Server

Can someone please point me to some code (preferably C#, but C++ or C or VB
will work) that will detect if the (local) instance of SQL Server is
running on a machine or not? Many thanks!
-- RobHi Rob
Try using the the ServiceController class to check to see if the MSSQLServer
service is running (ServiceControllerStatus.Running).
Cheers
J.
"Rob Gibson" <xnews@.rgibREMOVEson.net> wrote in message
news:Xns95FAE91589AFBdefffft1078@.216.196.97.142...
> Can someone please point me to some code (preferably C#, but C++ or C or
VB
> will work) that will detect if the (local) instance of SQL Server is
> running on a machine or not? Many thanks!
> -- Rob

No comments:

Post a Comment