Re: List availalbe SQL Servers?



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
.



Relevant Pages

  • RE: Backups have Shadow Copy Problems
    ... and restarted the server. ... suggested and changed the recovery model to simple on the one database called ... I understand the issue to be: the backup task failed ... You back up data from a volume that contains a Microsoft SQL Server ...
    (microsoft.public.windows.server.sbs)
  • Re: upsizing to sql 2005
    ... the word SERVER in it, ... You can access to the database by multiple means (Access, ... and how does it update the SQL database with the new records in Access? ... Query Name: Arcadia - ARC ...
    (microsoft.public.access.queries)
  • Re: Linked Tables in Access
    ... any use of SQL Passthru, Linked Tables or any other use of MDB / MDE ... server, or would I also need to convert *those* queries to passthrough ... I've been trying to understand why Access database files become corrupt. ...
    (microsoft.public.access.adp.sqlserver)
  • Re: Leveling by ID vs. "Standard"
    ... of this trade called Project Management. ... a database for the "Project Tables," ... to write reports on data from the server database. ... product supporting queries created with SQL. ...
    (microsoft.public.project)
  • Re: Trouble Getting VS.Net 2003 WalkThroughs MSDE Connection
    ... Config Tool of SQL Server? ... > link to download the PUBs database. ... >>> Setup and they directed me to install MSDE and they attached a ...
    (microsoft.public.sqlserver.msde)