LinkedServer Members

Include Protected Members
Include Inherited Members

A LinkedServer object represents a database system other than SQL Server and is linked to the current instance of SQL Server by using an OLE DB driver.

The LinkedServer type exposes the following members.

Constructors

  Name Description
Public method LinkedServer() Initializes a new instance of the LinkedServer object.
Public method LinkedServer(Server, String) Initializes a new instance of the LinkedServer object on the specified instance of SQL Server and with the specified name.

Top

Methods

  Name Description
Protected method AddDatabaseContext(StringCollection) (Inherited from SqlSmoObject.)
Public method Alter() Updates any LinkedServer object property changes on the instance of SQL Server.
Protected method AlterImpl() (Inherited from SqlSmoObject.)
Protected method AlterImplFinish(StringCollection, ScriptingOptions) (Inherited from SqlSmoObject.)
Protected method AlterImplInit(StringCollection%, ScriptingOptions%) (Inherited from SqlSmoObject.)
Protected method AlterImplWorker() (Inherited from SqlSmoObject.)
Protected method BindDefaultImpl(String, String, Boolean) (Inherited from SqlSmoObject.)
Protected method BindRuleImpl(String, String, Boolean) (Inherited from SqlSmoObject.)
Protected method CheckCollation(String, ScriptingOptions) (Inherited from SqlSmoObject.)
Protected method CheckObjectState() Validates the state of the referenced object. (Inherited from SqlSmoObject.)
Protected method CheckObjectState(Boolean) Validates the state of the referenced object with the option to specify that an exception is thrown if the object is not yet created. (Inherited from SqlSmoObject.)
Protected method CheckObjectStateImpl(Boolean) (Inherited from SqlSmoObject.)
Protected method CheckVersion100() (Inherited from SqlSmoObject.)
Protected method CheckVersion80() Checks the validity of the object on SQL Server 2000. (Inherited from SqlSmoObject.)
Protected method CheckVersion80SP3() Checks the validity of the object on SQL Server 2000 SP3. (Inherited from SqlSmoObject.)
Protected method CheckVersion90() Check the validity of the object on SQL Server 2005. (Inherited from SqlSmoObject.)
Protected method CheckVersionBelow90() (Inherited from SqlSmoObject.)
Protected method CleanObject() (Inherited from SqlSmoObject.)
Public method Create() Creates a linked server on the instance of SQL Server as defined by the LinkedServer object.
Protected method CreateImpl() (Inherited from SqlSmoObject.)
Protected method CreateImplFinish(StringCollection, ScriptingOptions) (Inherited from SqlSmoObject.)
Protected method CreateImplInit(StringCollection%, ScriptingOptions%) (Inherited from SqlSmoObject.)
Public method Discover() (Inherited from SqlSmoObject.)
Public method Drop() Removes the reference to the linked server from the instance of SQL Server.
Public method Drop(Boolean) Removes the reference to the linked server from the instance of SQL Server.
Protected method DropImpl() (Inherited from SqlSmoObject.)
Protected method DropImplWorker(Urn%) (Inherited from SqlSmoObject.)
Public method EnumColumns() Enumerates a list of columns that can be accessed on the linked server.
Public method EnumColumns(String) Enumerates a list of columns that can be accessed on the linked server for a specified table.
Public method EnumColumns(String, String) Enumerates a list of columns that can be accessed on the linked server for a specified table and schema.
Public method EnumColumns(String, String, String) Enumerates a list of columns that can be accessed on the linked server for a specified table, schema, and database.
Public method EnumColumns(String, String, String, String) Enumerates a list of columns that can be accessed on the linked server for a specified column.
Protected method EnumScriptImpl(ScriptingOptions) (Inherited from SqlSmoObject.)
Protected method EnumScriptImplWorker(ScriptingOptions) (Inherited from SqlSmoObject.)
Public method EnumTables() Enumerates a list of tables that are available on the linked server.
Public method EnumTables(String) Enumerates a list of tables that are available on the linked server for a specified table name.
Public method EnumTables(String, String) Enumerates a list of tables that are available on the linked server for a specified table name and schema.
Public method EnumTables(String, String, String) Enumerates a list of tables that are available on the linked server for a specified table name, schema, and database.
Public method EnumTables(String, String, String, LinkedTableType)
Public method Equals(Object) (Inherited from Object.)
Protected method Finalize() (Inherited from Object.)
Protected method FormatSqlVariant(Object) (Inherited from SqlSmoObject.)
Protected method GenerateDataSpaceFileStreamScript(StringBuilder, ScriptingOptions, Boolean) (Inherited from SqlSmoObject.)
Protected method GenerateDataSpaceScript(StringBuilder, ScriptingOptions) (Inherited from SqlSmoObject.)
Protected method GetBindDefaultScript(ScriptingOptions, String, String, Boolean) (Inherited from SqlSmoObject.)
Protected method GetBindRuleScript(ScriptingOptions, String, String, Boolean) (Inherited from SqlSmoObject.)
Protected method GetBoolParameter(StringBuilder, ScriptingOptions, String, String, Int32%) (Inherited from SqlSmoObject.)
Protected method GetBoolParameter(StringBuilder, ScriptingOptions, String, String, Int32%, Boolean) (Inherited from SqlSmoObject.)
Protected method GetDateTimeParameter(StringBuilder, ScriptingOptions, String, String, Int32%) (Inherited from SqlSmoObject.)
Protected method GetDateTimeParameterAsInt(StringBuilder, ScriptingOptions, String, String, Int32%) (Inherited from SqlSmoObject.)
Protected method GetDBName() Gets the database name that is associated with the object. (Inherited from SqlSmoObject.)
Protected method GetEnumParameter(StringBuilder, ScriptingOptions, String, String, Type, Int32%) (Inherited from SqlSmoObject.)
Protected method GetFragOptionString(FragmentationOption) (Inherited from SqlSmoObject.)
Protected method GetGuidParameter(StringBuilder, ScriptingOptions, String, String, Int32%) (Inherited from SqlSmoObject.)
Public method GetHashCode() (Inherited from Object.)
Protected method GetParameter(StringBuilder, ScriptingOptions, String, String, Int32%) (Inherited from SqlSmoObject.)
Protected method GetParameter(StringBuilder, ScriptingOptions, String, String, Int32%, Boolean) (Inherited from SqlSmoObject.)
Protected method GetPropValue(String) (Inherited from SqlSmoObject.)
Protected method GetPropValueOptional(String) (Inherited from SqlSmoObject.)
Protected method GetPropValueOptionalAllowNull(String) (Inherited from SqlSmoObject.)
Protected method GetRealValue(Property, Object) (Inherited from SqlSmoObject.)
Protected method GetScriptingOptionsForCreate() (Inherited from SqlSmoObject.)
Protected method GetServerName() Gets the name of the instance of SQL Server with which the object is associated. (Inherited from SqlSmoObject.)
Protected method GetServerObject() (Inherited from SqlSmoObject.)
Protected method GetSqlServerVersionName() Gets the version name of the instance of SQL Server with which the object is associated. (Inherited from SqlSmoObject.)
Protected method GetStringParameter(StringBuilder, ScriptingOptions, String, String, Int32%) (Inherited from SqlSmoObject.)
Protected method GetStringParameter(StringBuilder, ScriptingOptions, String, String, Int32%, Boolean) (Inherited from SqlSmoObject.)
Protected method GetTimeSpanParameterAsInt(StringBuilder, ScriptingOptions, String, String, Int32%) (Inherited from SqlSmoObject.)
Public method GetType() (Inherited from Object.)
Protected method GetUrnRecursive(StringBuilder) (Inherited from SqlSmoObject.)
Protected method GetUrnRecursive(StringBuilder, UrnIdOption) (Inherited from SqlSmoObject.)
Protected method ImplInitialize(array<String[], array<OrderBy[]) (Inherited from SqlSmoObject.)
Public method Initialize() Initializes the object and forces the properties be loaded. (Inherited from SqlSmoObject.)
Public method Initialize(Boolean) Initializes the object and forces the properties be loaded. (Inherited from SqlSmoObject.)
Protected method IsObjectDirty() Verifies whether the object properties have been modified and the changes have not yet been persisted on the instance of SQL Server. (Inherited from SqlSmoObject.)
Protected method IsObjectInitialized() Verifies whether the object has been initialized. (Inherited from SqlSmoObject.)
Protected method IsObjectInSpace() Verifies whether the object is isolated or connected to the instance of SQL Server. (Inherited from SqlSmoObject.)
Protected method IsVersion80SP3() (Inherited from SqlSmoObject.)
Protected method MarkDropped() (Inherited from SqlSmoObject.)
Protected method MarkForDropImpl(Boolean) (Inherited from SqlSmoObject.)
Protected method MemberwiseClone() (Inherited from Object.)
Protected method PostAlter() (Inherited from SqlSmoObject.)
Protected method PostCreate() (Inherited from SqlSmoObject.)
Protected method PostDrop() (Inherited from SqlSmoObject.)
Public method Refresh() Refreshes the object and retrieves properties when the object is next accessed. (Inherited from SqlSmoObject.)
Protected method RenameImpl(String) This method supports the SMO infrastructure and is not intended to be used directly from your code. (Inherited from NamedSmoObject.)
Protected method RenameImplWorker(String) This method supports the SMO infrastructure and is not intended to be used directly from your code. (Inherited from NamedSmoObject.)
Public method Script() Generates a Transact-SQL script that can be used to re-create the linked server registration.
Public method Script(ScriptingOptions) Generates a Transact-SQL script that can be used to re-create the linked server registration as specified by the script options.
Protected method ScriptAlter(StringCollection, ScriptingOptions) (Inherited from SqlSmoObject.)
Protected method ScriptChangeOwner(StringCollection, ScriptingOptions) This method supports the SMO infrastructure and is not intended to be used directly from your code. (Inherited from NamedSmoObject.)
Protected method ScriptCreate(StringCollection, ScriptingOptions) (Inherited from SqlSmoObject.)
Protected method ScriptDdl(StringCollection, ScriptingOptions) (Inherited from SqlSmoObject.)
Protected method ScriptDrop(StringCollection, ScriptingOptions) (Inherited from SqlSmoObject.)
Protected method ScriptImpl() (Inherited from SqlSmoObject.)
Protected method ScriptImpl(ScriptingOptions) (Inherited from SqlSmoObject.)
Protected method ScriptImplWorker(ScriptingOptions) (Inherited from SqlSmoObject.)
Protected method ScriptRename(StringCollection, ScriptingOptions, String) This method supports the SMO infrastructure and is not intended to be used directly from your code. (Inherited from NamedSmoObject.)
Protected method SetParentImpl(SqlSmoObject) (Inherited from SqlSmoObject.)
Public method TestConnection()
Public method ToString() Returns a String that represents the referenced object. (Inherited from SqlSmoObject.)
Protected method TouchImpl() (Inherited from SqlSmoObject.)
Protected method UnbindDefaultImpl(Boolean) (Inherited from SqlSmoObject.)
Protected method UnbindRuleImpl(Boolean) (Inherited from SqlSmoObject.)
Public method Validate(String, array<Object[]) (Inherited from SmoObjectBase.)

Top

Fields

  Name Description
Protected field m_ExtendedProperties (Inherited from SqlSmoObject.)

Top

Properties

  Name Description
Public property Catalog Gets or sets the database to be used when the linked server is made through a connection to an OLE DB provider. .
Public property CollationCompatible Gets or sets the Boolean property value that specifies whether the default collation of the linked server is compatible with the default collation on the local instance of SQL Server.
Public property CollationName Gets or sets the name of the collation to use when sorting data from the linked server.
Public property ConnectTimeout Gets or sets the number of seconds to wait for a connection to be established with the linked server before timing out.
Public property DataAccess Gets or sets the Boolean property value that specifies whether data can be accessed on the linked server.
Public property DataSource Gets or sets the data source to be used when the linked server is made through a connection to an OLE DB provider.
Public property DateLastModified Gets the date and time when the linked server was last modified.
Public property DistPublisher Gets or sets a Boolean property value that specifies whether the linked server is participating in replication as a distribution Publisher.
Public property Distributor Gets or sets a Boolean property value that specifies whether the linked server is participating in replication as a distribution Publisher.
Protected property ExecuteForScalar Gets or sets the Boolean property value that specifies whether the object is set to the execute for scalar option. (Inherited from SqlSmoObject.)
Public property ID Gets the ID value that uniquely identifies the linked server.
Public property IsPromotionofDistributedTransactionsForRPCEnabled Gets or sets a Boolean property value that specifies whether the promotion of distributed transaction for RPC (remote procedure calls) is enabled.
Protected property IsTouched Gets the Boolean property value that specifies whether the object properties have been updated but not yet persisted on the server. (Inherited from SqlSmoObject.)
Public property LazySchemaValidation Gets or sets the Boolean property value that specifies whether the schema used by the linked server data is validated when the local instance of SQL Server is idle or not.
Public property LinkedServerLogins Represents a collection of LinkedServerLogin objects. Each LinkedServerLogin object represents a linked server login defined on the linked server.
Public property Location Gets or sets the description of the location of the linked server.
Public property Name Gets or sets the name of the object. (Inherited from NamedSmoObject.)
Protected property ObjectInSpace Gets the Boolean property value that specifies whether the object exists in isolation, or whether it is directly or indirectly connected to the instance of SQL Server. (Inherited from SqlSmoObject.)
Public property Parent Gets or sets the Server object that is the parent of the LinkedServer object.
Public property ProductName Gets or sets the name of the product to which SQL Server can connect through the OLE DB Provider.
Public property Properties Gets a collection of Property objects that represent the object properties. (Inherited from SqlSmoObject.)
Public property ProviderName Gets or sets the name of the OLE DB provider used to connect to the linked server.
Public property ProviderString Gets or sets the connection string used to connect to a linked server by way of the OLE DB Provider.
Public property Publisher Gets or sets a Boolean property value that specifies whether the linked server is a replication Publisher or not.
Public property QueryTimeout Gets or sets the time in seconds to wait for a query to execute before timing out.
Public property Rpc Gets or sets the Boolean property value that specifies whether the linked server supports remote procedure calls (RPCs).
Public property RpcOut The Boolean property value that specifies whether the linked server supports remote procedure calls (RPCs) with output parameters.
Protected property ScalarResult Gets the scalar result for the referenced object. (Inherited from SqlSmoObject.)
Public property State Gets the state of the referenced object. (Inherited from SmoObjectBase.)
Public property Subscriber Gets or sets the Boolean property value that specifies whether the linked server is a replication Subscriber.
Public property Urn Gets the Uniform Resource Name (URN) address value that uniquely identifies the object. (Inherited from SqlSmoObject.)
Public property UserData Gets or sets user-defined data associated with the referenced object. (Inherited from SmoObjectBase.)
Public property UseRemoteCollation Gets or sets the Boolean property value that specifies whether to use the collation that is associated with the data from the linked server.

Top

Events

  Name Description
Public event PropertyChanged (Inherited from SqlSmoObject.)
Public event PropertyMetadataChanged (Inherited from SqlSmoObject.)

Top

Explicit Interface Implementations

  Name Description
Explicit interface implemetationPrivate method IAlienObjectDiscover() (Inherited from SqlSmoObject.)
Explicit interface implemetationPrivate method IAlienObjectGetParent() (Inherited from SqlSmoObject.)
Explicit interface implemetationPrivate method IAlienObjectGetProperty(String) (Inherited from SqlSmoObject.)
Explicit interface implemetationPrivate method ISfcPropertyProviderGetPropertySet() (Inherited from SqlSmoObject.)
Explicit interface implemetationPrivate method IAlienObjectGetUrn() (Inherited from SqlSmoObject.)
Explicit interface implemetationPrivate method IAlienObjectResolve(String) (Inherited from SqlSmoObject.)
Explicit interface implemetationPrivate method IAlienObjectSetProperty(Object, Object) (Inherited from SqlSmoObject.)

Top