Re: List availalbe SQL Servers?
- From: Jouni Aro <jouni.aro@xxxxxxxxx>
- Date: Wed, 26 Mar 2008 13:55:25 +0200
Chris.Cheney wrote:
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).
Yes, I also figured that it's fading away...
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).
I am still a novice with .NET - how do you access that from Delphi win32?
"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.
Should SQLEXPRESS be included in the list from SMO (see my response to Vitali for my server configuration)?
.
- Follow-Ups:
- Re: List availalbe SQL Servers?
- From: Chris.Cheney
- Re: List availalbe SQL Servers?
- References:
- List availalbe SQL Servers?
- From: Jouni Aro
- Re: List availalbe SQL Servers?
- From: Chris.Cheney
- List availalbe SQL Servers?
- Prev by Date: Re: List availalbe SQL Servers?
- Next by Date: Re: List availalbe SQL Servers?
- Previous by thread: Re: List availalbe SQL Servers?
- Next by thread: Re: List availalbe SQL Servers?
- Index(es):
Relevant Pages
|