05/22: Linked Servers on MS SQL
Category: Web dev
Posted by: hajime osako
sp_addlinkedserver [ @server = ] 'server' [ , [ @srvproduct = ] 'product_name' ] [ , [ @provider = ] 'provider_name' ] [ , [ @datasrc = ] 'data_source' ] [ , [ @location = ] 'location' ] [ , [ @provstr = ] 'provider_string' ] [ , [ @catalog = ] 'catalog' ] EXEC sp_addlinkedserver 'EXCEL2', 'Excel', 'Microsoft.Jet.OLEDB.4.0', 'c:\temp\authors.xls', NULL, 'Excel 8.0;IMEX=1;', NULL EXEC sp_addlinkedsrvlogin 'EXCEL2', 'false', NULL, NULL, NULL To confirm: exec sp_linkedservers