Configure the OLE DB Provider as a Linked Server Automatically
Before you begin
About this task
This topic describes how to configure the OLE DB provider as a linked server automatically using the sp_addlinkedserver system stored procedure from Microsoft SQL Server. You can also configure it manually.
Procedure
-
To configure a linked server definition, use the following example code:
EXEC sp_addlinkedserver @server='MYSERVER_LS', @srvproduct='', @provider='iHOLEDB.iHistorian.1', @datasrc='MY_SERVER'
-
To search for linked server definitions, use the following example code:
EXEC sp_linkedservers
-
To delete linked server definitions, use the following example code:
EXEC sp_dropserver 'MYSERVER_LS', 'droplogins'