Re: List availalbe SQL Servers?
- From: Jouni Aro <jouni.aro@xxxxxxxxx>
- Date: Thu, 27 Mar 2008 10:25:34 +0200
Chris.Cheney wrote:
Jouni Aro <jouni.aro@xxxxxxxxx> wrote in
news:47ea39b3@xxxxxxxxxxxxxxxxxxxxxx:
2. Current SQL SMO: the EnumAvailableServers method of the .NET SmoApplication class enumerates a list of available INSTANCES ofI am still a novice with .NET - how do you access that from Delphi
Microsoft SQL Server (http://msdn2.microsoft.com/en-
us/library/microsoft.sqlserver.management.smo.smoapplication.enumavail
ables qlservers.aspx).
win32?
AFAICS MS have not provided a COM-Callable Wrapper for SMO so it seems that you can't.
Well, that's a way to promote .NET, at least... :)
"Available" instances is a misnomer - although an instance may beShould SQLEXPRESS be included in the list from SMO (see my response to
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.
Vitali for my server configuration)?
Yes - but I think only if network-enabled.
BTW to run Vitali's code, you will need
uses AdoDB, AdoInt, OleDB, DB, ComObj, ActiveX;
Yes, I figured that out, thanks anyway!
FWIW I have run that code on a computer where there is a default instance of SQL Server 2000 and a (network-disabled) named instance of SQL 2005 Express, and it only finds the SQL Server 2000 instance, whereas SQL Service Manager finds both.
Did you refer to Vitali's code or the SMO here?
However, it is the answer to what you can do when SQL DMO is not supported.
I suppose you mean both the OLEDB/SQLNCLI Enumerator or SMO here?
.
- 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
- Re: 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
|