Detect SQL Server Service

D

Derek Hart

I am running a winforms application as a scheduled task in Windows, but I
want it to wait to make sure the SQL Server Service is running before it
runs the app. Can I detect this in vb.net code?

Derek
 
D

danthi

Make a connection to the SQL Server database and if it is successful
then the SQL Server service must be running. If the connection attempt
fails it most likely isn't running.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top