how to enumarate SQL Server local instances in C#?
-
Hello gurus, I'd like to know how I can enumerate the SQL Server instances on the local machine? How can do this in C#? For example, if I have installed the default instance, an the instance named "TOTO" on my system, I wish to see the two names in my enumaration (local and TOTO). Best regards. Fred. Note: the sample in VS 7.1 that uses ODBC does not work with SQL Server 2005 and VS2005.
There is no spoon.
-
Hello gurus, I'd like to know how I can enumerate the SQL Server instances on the local machine? How can do this in C#? For example, if I have installed the default instance, an the instance named "TOTO" on my system, I wish to see the two names in my enumaration (local and TOTO). Best regards. Fred. Note: the sample in VS 7.1 that uses ODBC does not work with SQL Server 2005 and VS2005.
There is no spoon.
-
I was talking about this sample. it does not work on VS 2005 & SQL Server 2005...
There is no spoon.
-
yes, I have converted it. I have started the browser service and I could run it. But it enumerates the SQL Servers on the local network, not the instances on the local machine. For example, if I have two instances (default and TOTO), I should get the MSSQLSERVER service that runs for the default instance, and MSSQLSERVER$TOTO service that runs for the TOTO instance... I wish to retrieve this information. Best regards.
There is no spoon.
-
yes, I have converted it. I have started the browser service and I could run it. But it enumerates the SQL Servers on the local network, not the instances on the local machine. For example, if I have two instances (default and TOTO), I should get the MSSQLSERVER service that runs for the default instance, and MSSQLSERVER$TOTO service that runs for the TOTO instance... I wish to retrieve this information. Best regards.
There is no spoon.