By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,344 Members | 1,139 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,344 IT Pros & Developers. It's quick & easy.

Enum SQLServers and Instances that are running

P: n/a
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
Nov 20 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
ListAvailableSQLServers Method of the SQL DMO object??

Rgds,
Anand
VB.NET MVP
http://www.dotnetindia.com

"Mark Hollander" wrote:
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

Nov 20 '05 #2

P: n/a
* Mark Hollander <ma**@atcom.co.za> scripsit:
How do I enumerate the SQL Servers that are on the network and the
instances that are running on those servers


<URL:http://groups.google.de/groups?selm=uake%233JlBHA.2480%40tkmsftngp04>

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #3

P: n/a
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

-----------------
"Mark Hollander" <ma**@atcom.co.za> wrote in message
news:5e********************************@4ax.com...
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

Nov 20 '05 #4

P: n/a
Thanks, It works well,
now can one specify what domain to look in.

Thank you
Mark Hollander
On Mon, 12 Jul 2004 11:32:25 +0200, Mark Hollander <ma**@atcom.co.za>
wrote:

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
Nov 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.