1.启用 'Ad Hoc Distributed Queries'
exec sp_configure 'show advanced options',1
reconfigure
exec sp_configure 'Ad Hoc Distributed Queries',1
reconfigure
2.查询demo:SELECT * FROM OPENDATASOURCE
(
'SQLOLEDB','
DataSource=192.168.120.191;
User ID=sa;
Password=123456'
).FuelDataMgt.dbo.Operator
demo:SELECT * FROM OPENDATASOURCE
(
'SQLOLEDB','
DataSource=192.168.120.191;
User ID=sa;
Password=123456'
).FuelDataMgt.dbo.Operator
3.关闭 'Ad Hoc Distributed Queries'
exec sp_configure 'Ad Hoc Distributed Queries',0
reconfigure
exec sp_configure 'show advanced options',0
reconfigure