新聞中心
這里有您想知道的互聯(lián)網(wǎng)營(yíng)銷解決方案
SQLServer阻止\'AdHocDistributedQueries\'?
以下的文章主要描述的是SQL Server 阻止對(duì)組件 \'Ad Hoc Distributed Queries\' 的錯(cuò)誤訪問(wèn),在實(shí)際操作中如果你想用openrowset 來(lái)對(duì)遠(yuǎn)程數(shù)據(jù)庫(kù)進(jìn)行查詢,其結(jié)果提示SQL Server 阻止了對(duì)組件 \'Ad Hoc Distributed Queries\' 的訪問(wèn)錯(cuò)誤,在網(wǎng)上搜索了一下,找到解決方法:?

啟用Ad Hoc Distributed Queries:
- exec sp_configure 'show advanced options',1
- reconfigure
- exec sp_configure 'Ad Hoc Distributed Queries',1
- reconfigure
使用完成后,關(guān)閉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=ServerName;User ID=sa;Password=sa'
- ).DataBaseName.dbo.Table
- select * from openrowset( 'SQLOLEDB ', 'IP地址'; '用戶名'; '密碼',數(shù)據(jù)庫(kù)名.dbo.表名)
以上的相關(guān)內(nèi)容就是對(duì)SQL Server 阻止了對(duì)組件 \'Ad Hoc Distributed Queries\' 的訪問(wèn)錯(cuò)誤的介紹,望你能有所收獲。
上述的相關(guān)內(nèi)容就是對(duì)SQL Server 阻止了對(duì)組件 \'Ad Hoc Distributed Queries\' 的訪問(wèn)錯(cuò)誤的描述,希望會(huì)給你帶來(lái)一些幫助在此方面。
【編輯推薦】
- SQL Server 2005缺失索引的找回方案
- SQL Server XML 入門的18句話
- SQL Server附加數(shù)據(jù)庫(kù)出錯(cuò)的破解方案
- SQL Server 2005報(bào)告服務(wù)架構(gòu)的正確剖析
- SQL Server拆分字符串的3常用種方法
當(dāng)前標(biāo)題:SQLServer阻止\'AdHocDistributedQueries\'?
本文來(lái)源:http://m.fisionsoft.com.cn/article/dpdjjge.html


咨詢
建站咨詢
