标签:
第一步:
启用Ad Hoc Distributed Queries语句:
exec sp_configure ‘show advanced options‘,1
reconfigure
exec sp_configure ‘Ad Hoc Distributed Queries‘,1
reconfigure
附关闭Ad Hoc Distributed Queries语句:
exec sp_configure ‘Ad Hoc Distributed Queries‘,0
reconfigure
exec sp_configure ‘show advanced options‘,0
reconfigure
第二步:
SELECT * FROM OPENDATASOURCE(
‘SQLOLEDB‘,
‘Data Source=.;User ID=sa;Password=sa‘).数据库名.dbo.表名
标签:
原文地址:http://www.cnblogs.com/ericzhai/p/5421513.html