T-SQL筆記46_SQL Server 已封鎖元件 'Ad Hoc Distributed Queries' 的 STATEMENT 'OpenRowset/OpenDatasource' 之存取,因為此元件已經由此伺服器的安全性組態關閉。
可透過下達指令方式來開啟
-- 首先啟動 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
Ref:
https://ailog.tw/lifelog/2019/12/09/sql-ad-hoc-distributed/
https://zhuanlan.zhihu.com/p/370138931
https://www.cnblogs.com/Summer6/p/11129330.html
https://www.kodyaz.com/articles/enable-Ad-Hoc-Distributed-Queries.aspx
留言
張貼留言