LinkedServers propriété
Represents a collection of LinkedServer objects. Each LinkedServer object represents a linked server registered on the instance of SQL Server.
Espace de noms : Microsoft.SqlServer.Management.Smo
Assembly : Microsoft.SqlServer.Smo (dans Microsoft.SqlServer.Smo.dll)
Syntaxe
'Déclaration
<SfcObjectAttribute(SfcContainerRelationship.ObjectContainer, SfcContainerCardinality.ZeroToAny, _
GetType(LinkedServer))> _
Public ReadOnly Property LinkedServers As LinkedServerCollection
Get
'Utilisation
Dim instance As Server
Dim value As LinkedServerCollection
value = instance.LinkedServers
[SfcObjectAttribute(SfcContainerRelationship.ObjectContainer, SfcContainerCardinality.ZeroToAny,
typeof(LinkedServer))]
public LinkedServerCollection LinkedServers { get; }
[SfcObjectAttribute(SfcContainerRelationship::ObjectContainer, SfcContainerCardinality::ZeroToAny,
typeof(LinkedServer))]
public:
property LinkedServerCollection^ LinkedServers {
LinkedServerCollection^ get ();
}
[<SfcObjectAttribute(SfcContainerRelationship.ObjectContainer, SfcContainerCardinality.ZeroToAny,
typeof(LinkedServer))>]
member LinkedServers : LinkedServerCollection
function get LinkedServers () : LinkedServerCollection
Valeur de la propriété
Type : Microsoft.SqlServer.Management.Smo. . :: . .LinkedServerCollection
A LinkedServerCollection object that represents all the linked servers registered on the instance of SQL Server.
Notes
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.
Exemples
'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
Voir aussi