Partager via


Server.LinkedServers Property

Represents a collection of LinkedServer objects. Each LinkedServer object represents a linked server registered on the instance of Microsoft SQL Server.

Espace de noms: Microsoft.SqlServer.Management.Smo
Assembly: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)

Syntaxe

'Déclaration
Public ReadOnly Property LinkedServers As LinkedServerCollection
public LinkedServerCollection LinkedServers { get; }
public:
property LinkedServerCollection^ LinkedServers {
    LinkedServerCollection^ get ();
}
/** @property */
public LinkedServerCollection get_LinkedServers ()
public function get LinkedServers () : LinkedServerCollection

Valeur de propriété

A LinkedServerCollection object that represents all the linked servers registered on the instance of SQL Server.

Notes

Texte mis à jour :

The LinkedServers property points to the LinkedServerCollection object. You can use the collection to reference the linked servers registered on the instance of SQL Server.

Cet espace de noms, cette classe ou ce membre est pris en charge uniquement par la version 2.0 de Microsoft .NET Framework.

Exemple

'Connect to the local, default instance of SQL Server.
Dim srv As Server
srv = New Server
'Display the linked servers.
Dim lksv As LinkedServer
For Each lksv In srv.LinkedServers
   Console.WriteLine(lksv.Name)
Next

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

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

Autres ressources

How to: Link to an OLE-DB Provider Server in Visual Basic .NET
Using Collections
Setting Properties
Gestion des serveurs