sqlserver 连接不同服务器,不同实例
SELECT *
FROM OPENDATASOURCE(
'SQLOLEDB',
'Data Source=ServerName;User ID=MyUID;Password=MyPass'
).pubs.dbo.表, OPENDATASOURCE(
'SQLOLEDB',
'Data Source=另一台pcServerName;UserID=另UID;Password=另Pass'
).pubs.dbo.表
FROM OPENDATASOURCE(
'SQLOLEDB',
'Data Source=ServerName;User ID=MyUID;Password=MyPass'
).pubs.dbo.表, OPENDATASOURCE(
'SQLOLEDB',
'Data Source=另一台pcServerName;UserID=另UID;Password=另Pass'
).pubs.dbo.表