exec sp_configure 'show advanced options',1
reconfigure
exec sp_configure 'Ad Hoc Distributed Queries',1
reconfigure
GO
SELECT *
FROM OPENDATASOURCE(
'SQLOLEDB',
'Data Source=IP;User ID=sa;Password=1'
).EagHR.dbo.表名
GO
exec sp_configure 'Ad Hoc Distributed Queries',0
reconfigure
exec sp_configure 'show advanced options',0
reconfigure