Re: List availalbe SQL Servers?
- From: "Chris.Cheney" <Chris.CheneyXXNOSPAMXX@xxxxxxxxx>
- Date: 26 Mar 2008 06:41:02 -0700
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 of
Microsoft SQL Server (http://msdn2.microsoft.com/en-
us/library/microsoft.sqlserver.management.smo.smoapplication.enumavail
ables qlservers.aspx).
I am still a novice with .NET - how do you access that from Delphi
win32?
AFAICS MS have not provided a COM-Callable Wrapper for SMO so it seems that
you can't.
"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)?
Yes - but I think only if network-enabled.
BTW to run Vitali's code, you will need
uses AdoDB, AdoInt, OleDB, DB, ComObj, ActiveX;
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.
However, it is the answer to what you can do when SQL DMO is not supported.
.
- Follow-Ups:
- Re: List availalbe SQL Servers?
- From: Jouni Aro
- 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
- 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
|