分布式查询
SELECT *
FROM OPENDATASOURCE(
'SQLOLEDB',
'Data Source=ServerName;User ID=MyUID;Password=MyPass'
).Northwind.dbo.Categories
EXEC sp_addlinkedserver @server='S1_instance5', @srvproduct='',
@provider='SQLOLEDB', @datasrc='Remto1',
@catalog ='Northwind'
Select * from Remto1.Northwind.dbo.Categories
对于分布式事务
使用BEGIN DISTRIBUTED TRANSACTION