0

How to check a particular instance of sql server is running or not which is installed in a network pc(not in local pc) by using vb.net. I can try to open a connection and check for timeout and find that connection failed.But i don't want it to do that way.So please come up with any other solution

IT researcher
  • 3,274
  • 17
  • 79
  • 143

1 Answers1

1

You can retrieve a DataTable with the information about all the connected SQL Servers as described here and check if the one that you are looking for is listed or not.

Sample code

Dim DataTable1 As DataTable = SqlDataSourceEnumerator.Instance.GetDataSources
David -
  • 2,009
  • 1
  • 13
  • 9