The LinkedServer object exposes the properties of an OLE DB data source and allows directed Transact-SQL queries against defined data sources.
Microsoft® SQL Server™ 2000 supports Transact-SQL queries against data stored in one or more SQL Server and heterogeneous databases. SQL Server distributed queries use OLE DB to access a nonlocal data store.
OLE DB defines a provider as an OLE DB component that can deliver data from a store. Typically, OLE DB providers can discriminate among applicable, available data stores. OLE DB defines a data source as that information necessary for the successful delivery of data from the store (such as a user identifier and password).
SQL Server implements persistent storage of an OLE DB provider name and data source definition called a linked server.
With the LinkedServer object, you can:
The Name property of a LinkedServer object uses the SQL Server data type sysname. The value of the Name property must be unique within an instance of SQL Server.
To create a linked server
Note When a linked server is created, SQL Server creates a default linked server login record. When using SQL-DMO to create a linked server, adding the LinkedServer object to its containing collection creates the linked server and the default linked server login. The object's LinkedServerLogins collection contains one member. For more information about the default linked server login created, see sp_addlinkedsrvlogin.
The LinkedServer object is compatible with instances of SQL Server 2000 and SQL Server version 7.0. However, the LinkedServer2 object extends the functionality of the LinkedServer object for use with features that are new in SQL Server 2000.