exec sp_configure 'show advanced options',1
reconfigure
exec sp_configure 'Ad Hoc Distributed Queries',1
reconfigure
GO
SELECT *
FROM OPENDATASOURCE('SQLOLEDB', 'Data Source=192.168.1.100,1433;User ID=sa;Password=sa').msdb.dbo.backupfile
exec sp_configure 'Ad Hoc Distributed Queries',0
reconfigure
exec sp_configure 'show advanced options',0
reconfigure
标签:Ad,exec,sql2005,OPENDATASOURCE,sp,Distributed,reconfigure,Hoc,configure
From: https://blog.51cto.com/u_16076050/6195821