开启MSSQLServer跨服务器查询功能

  • 首先在MSSQL客户端中进行如下图文操作配置


  • 其次使用脚本进行操作配置

    ---开启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

机会是凭自己争取的,命运是靠自己把握的,生命是自己的画,为何要依靠别人着色?!
原文地址:https://www.cnblogs.com/GeorgeYao/p/4042354.html