Get available server names of Sql Server within the local network – SqlDataSourceEnumerator

SqlDataSourceEnumerator is a class in .net framework that gets the available instances of SQL Server within the local network.

DataTable dt = SqlDataSourceEnumerator.Instance.GetDataSources();

SqlDataSourceEnumerator.Instance.GetDataSources() returns a datatable with the available servers in the current network.

The DataTable returned as 4 colunms such as :-

  • ServerName
  • InstanceName
  • IsClustered
  • Version

Popularity: 1% [?]

Related posts:

  1. SQL Server Connection Using Integrated Security
  2. Sql Server Interview Questions – Part 1
  3. Check Sql Server database is Case Sensitive or Insensitive (Collation)
  4. Java with Sql Server
  5. Using OVER() with Aggregate Functions in Sql Server 2005
You can leave a response, or trackback from your own site.

Leave a Reply

Designed by: Business Web Hosting | Thanks to Buy Icons, travel tips and Used Cars