当我在Server 2000中使用OPENROWSET运行查询时,它可以工作。
但是Server 2008中的相同查询会生成以下错误:
SQL server阻止对组件'Ad分布式查询‘的语句'OpenRowset/OpenDatasource’的访问,因为该组件作为此服务器的安全配置的一部分被关闭。系统管理员可以使用sp_configure启用“Ad分布式查询”
我试着跑
EXEC sp_configure 'show advanced options', 1
RECONFIGURE
GO
EXEC sp_configure 'ad hoc distributed queries', 1
RECONFIGURE
GO但是,任何运行RECONFIGURE的尝试都会导致错误:
Msg 5808, Level 16, State 1, Line 1
Ad hoc update to system catalogs is not supported.如何在Server 2008 R2中启用Ad分布式查询?
注: Microsoft 2008 R2 (SP1) - 10.50.2550.0 (X64) 2012年6月11日16:41:53版权(c)微软公司标准版(64位)在WindowsNT6.1 (Build 7601: Service Pack 1) (Hypervisor)
发布于 2013-03-05 14:47:55
出发地:http://sqlserverpedia.com/blog/database-design/error-message-ad-hoc-update-to-system-catalogs-is-not-supported/
要么先运行这个:
EXEC sp_configure ‘allow updates’, 0
RECONFIGURE或者将RECONFIGURE语句更改为RECONFIGURE WITH OVERRIDE:
EXEC sp_configure 'show advanced options', 1
RECONFIGURE WITH OVERRIDE --really reconfigure
GO
EXEC sp_configure 'ad hoc distributed queries', 1
RECONFIGURE WITH OVERRIDE --really reconfigure
GOhttps://serverfault.com/questions/484859
复制相似问题