If you want to find MS SQL Servers which are available in a network, there are two different ways you can use for searching the network for available Sql Servers.
1 – There is a class in the .NET Framework which name is SqlDataSourceEnumerator in the System.Data.Sql namespace. We can use that class, and get the sql servers easly:
DataTable sqls = SqlDataSourceEnumerator.Instance.GetDataSources();
In this method we can only get the Sql Server machines on a network. There is also another method to get list of SQL Servers on a network. Also this second method can also be used to search for some other type of servers too. Here is the second method;