---开启SQLServer 跨服务器查询功能
exec sp_configure ‘show advanced options‘,1 reconfigure exec sp_configure ‘Ad Hoc Distributed Queries‘,1 reconfigure
--关闭SQLServer 跨服务器查询功能
exec sp_configure ‘Ad Hoc Distributed Queries‘,0 reconfigure exec sp_configure ‘show advanced options‘,0 reconfigure
原文:http://www.cnblogs.com/GeorgeYao/p/4042354.html