Compartir a través de


SmoApplication.EnumAvailableSqlServers Method (String)

Enumerates a list of available instances of Microsoft SQL Server that are installed on the computer with the specified instance name.

Espacio de nombres: Microsoft.SqlServer.Management.Smo
Ensamblado: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)

Sintaxis

'Declaración
Public Shared Function EnumAvailableSqlServers ( _
    name As String _
) As DataTable
public static DataTable EnumAvailableSqlServers (
    string name
)
public:
static DataTable^ EnumAvailableSqlServers (
    String^ name
)
public static DataTable EnumAvailableSqlServers (
    String name
)
public static function EnumAvailableSqlServers (
    name : String
) : DataTable

Parámetros

  • name
    A String value that specifies the name of the computer on which the instances of SQL Server are installed or a single instance of SQL Server.

Valor devuelto

A DataTable system object value that contains an enumerated list of information about the available instances of SQL Server on the specified computer. If a single instance of SQL Server is specified in the name parameter, instead of a computer name, results are returned for the specified instance only. The table describes the different columns of the returned DataTable.

Column

Data type

Description

Name

String

The name of the instance of SQL Server.

Server

String

The name of the server on which the instance of SQL Server is installed.

Instance

String

The instance of SQL Server.

IsClustered

Boolean

A Boolean value that is true if the instance is participating in failover clustering, or false if it is not.

Version

String

The version of the instance of SQL Server.

IsLocal

Boolean

A Boolean value that is true if the instance is local, or false if the instance is remote.

Notas

Texto actualizado:

The computer that is running the instance SQL Server might not receive responses to the EnumAvailableSqlServers method in a timely manner. The returned list might not show all the available instances of SQL Server on the network. When you call the EnumAvailableSqlServers method in subsequent tries, more servers might become visible on the network.

This method fails to list the local instance if a firewall is operating on the server. The firewall blocks any broadcast traffic issued when the method is called, even if the sender is from local machine.

Este espacio de nombres, clase o miembro solamente se admite en la versión 2.0 de Microsoft .NET Framework.

Ejemplo

How to: Register Event Handlers and Subscribe to Event Handling in Visual Basic .NET

Seguridad para subprocesos

Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Plataformas

Plataformas de desarrollo

Para obtener una lista de las plataformas compatibles, vea Requisitos de hardware y software para instalar SQL Server 2005.

Plataformas de destino

Para obtener una lista de las plataformas compatibles, vea Requisitos de hardware y software para instalar SQL Server 2005.

Vea también

Referencia

SmoApplication Class
SmoApplication Members
Microsoft.SqlServer.Management.Smo Namespace

Otros recursos

Handling SMO Events