SqlDataSourceEnumerator provides you with all instances, but they do not necessarily work. For local SQL instances, you can use the ServiceController object, the System.ServiceProcess namespace. The service name is the union of "MSSQL $" and "InstanceName" from SqlDataSourceEnumerator. Set the ServiceName property of the ServiceController object, and you can check the Status property - Stopped, Startup, Delayed, etc. Consequently, you can filter "Launch"
Vladimir
source share