sp_addlinkedserver [@server =] '<server>'
[, [@srvproduct =] '<product name>']
[, [@provider =] '<provider name>']
[, [@datasrc =] '<data source path>']
[, [@location =] '<location>']
[, [@provstr =] '<connection string>']
[, [@catalog =] '<database or equivalent for datasource>']
EXEC sp_addlinkedserver @Server = 'MyLocalServer',
@srvproduct = 'SQLServer OLEDB Provider',
@provider = 'SQLOLEDB',
@datasrc = 'SOCRATES'
SELECT CustomerID, CompanyName
FROM MyLocalServer.Northwind.dbo.Customers
WHERE CustomerID < '1'
25.16.sp_addlinkedserver |
| 25.16.1. | Add a server link |