Remarque
L’accès à cette page nécessite une autorisation. Vous pouvez essayer de vous connecter ou de modifier des répertoires.
L’accès à cette page nécessite une autorisation. Vous pouvez essayer de modifier des répertoires.
Enumerates a list of available instances of Microsoft SQL Server.
Espace de noms: Microsoft.SqlServer.Management.Smo
Assembly: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)
Syntaxe
'Déclaration
Public Shared Function EnumAvailableSqlServers As DataTable
public static DataTable EnumAvailableSqlServers ()
public:
static DataTable^ EnumAvailableSqlServers ()
public static DataTable EnumAvailableSqlServers ()
public static function EnumAvailableSqlServers () : DataTable
Valeur de retour
A DataTable system object value that contains an enumerated list of information about the available instances of SQL Server. The table describes the different columns of the returned DataTable.
Column |
Data type |
Description |
Name |
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 |
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. |
Notes
Texte mis à jour :
The computer 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.
Cet espace de noms, cette classe ou ce membre est pris en charge uniquement par la version 2.0 de Microsoft .NET Framework.
Exemple
How to: Register Event Handlers and Subscribe to Event Handling in Visual Basic .NET
Sécurité des threads
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.
Plateformes
Plateformes de développement
Pour obtenir la liste des plateformes prises en charge, consultez Configuration matérielle et logicielle requise pour l'installation de SQL Server 2005.
Plateformes cibles
Pour obtenir la liste des plateformes prises en charge, consultez Configuration matérielle et logicielle requise pour l'installation de SQL Server 2005.
Voir aussi
Référence
SmoApplication Class
SmoApplication Members
Microsoft.SqlServer.Management.Smo Namespace