The LinkedServers collection contains LinkedServer objects exposing the properties of an OLE DB data source.
Microsoft® SQL Server™ implements persistent storage of an OLE DB provider name and data source definition called a linked server.
With the LinkedServers collection, you can:
For more information about creating a linked server by using the LinkedServer object and LinkedServers collection, see LinkedServer Object.
To remove a linked server
When using the Item or Remove method, the LinkedServers collection supports member identification using either name or ordinal reference syntax. For example:
Set oLinkedServer = oSQLServer.LinkedServers("SEATTLE1")
Or:
Set oLinkedServer = oSQLServer.LinkedServers(1)
Note Creating or removing OLE DB data source definitions persisted as SQL Server linked servers by using the LinkedServers collection requires appropriate privilege. The SQL Server login used for SQLServer object connection must be a member of the fixed role sysadmin.
Add Method | Refresh Method |
Item Method | Remove Method (Collections) |