Re: List availalbe SQL Servers?
- From: "Chris.Cheney" <Chris.CheneyXXNOSPAMXX@xxxxxxxxx>
- Date: 26 Mar 2008 01:46:48 -0700
Jouni Aro <jouni.aro@xxxxxxxxx> wrote in
news:47e91ee9$1@xxxxxxxxxxxxxxxxxxxxxx:
I would need to find out the available SQL Servers (mainly 2005, but
possibly 2000 as well, and definitely with 2008 in future) to be able
to create and connect to a new database using a selectable database
instance.
I tried to search for some hints, but mostly get only .NET stuff.
I found a reference to SQLDMO
(http://www.delphi3000.com/articles/article_4052.asp?SK=), but it
seems that support for that is about to be dropped, so I would prefer
to use something that will also work with 2008 and later.
Also the code in the link seems to list servers only and does not find
all available instances.
Any ideas?
BR,
Jouni Aro
Prosys
1. Obsolescent SQL DMO: the ListAvailableSQLServers method of the
Aplication object gives network-visible INSTANCES
(http://msdn2.microsoft.com/en-us/library/aa238042(SQL.80).aspx).
2. Current SQL SMO: the EnumAvailableServers method of the .NET
SmoApplication class enumerates a list of available INSTANCES of Microsoft
SQL Server (http://msdn2.microsoft.com/en-
us/library/microsoft.sqlserver.management.smo.smoapplication.enumavailables
qlservers.aspx).
"Available" instances is a misnomer - although an instance may be available
for making a connection to (if you know its server and instance names), it
might not be visible to List/EnumAvailableSQLServers, one reason being that
network connections for the instance are disabled.
HTH
.
- Follow-Ups:
- Re: List availalbe SQL Servers?
- From: Jouni Aro
- Re: List availalbe SQL Servers?
- References:
- List availalbe SQL Servers?
- From: Jouni Aro
- List availalbe SQL Servers?
- Prev by Date: Re: Problem with Master/Detail tables
- Next by Date: Re: List availalbe SQL Servers?
- Previous by thread: List availalbe SQL Servers?
- Next by thread: Re: List availalbe SQL Servers?
- Index(es):
Relevant Pages
|