Enum SQLServers and Instances that are running

  • Thread starter Thread starter Mark Hollander
  • Start date Start date
M

Mark Hollander

Hi All,

How do I enumerate the SQL Servers that are on the network and the
instances that are running on those servers


I have to develope a wizard and part of the wizard is to ask the user
what sqlserver they would like to use, it is also possible that the
sql server is running more than one instance.


Thank you
Mark Hollander
 
Hi,

Here is an example of using the sql dmo like Anand recommends. Add a
reference to Microsoft sqldmo object library in the com tab.

Dim sqlServers As SQLDMO.NameList

Dim sqlServer As String

' Get a list of servers

sqlServers = New SQLDMO.Application().ListAvailableSQLServers

For Each sqlServer In sqlServers

Debug.WriteLine(sqlServer)

Next



Ken
 
Thanks, It works well,
now can one specify what domain to look in.

Thank you
Mark Hollander


Hi All,

How do I enumerate the SQL Servers that are on the network and the
instances that are running on those servers


I have to develope a wizard and part of the wizard is to ask the user
what sqlserver they would like to use, it is also possible that the
sql server is running more than one instance.


Thank you
Mark Hollander




Thank you
Mark Hollander
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top