访问MS Access 系统表 MSysObjects ,在SQL SERVER 2005中访问
首先設(shè)置MS Access,給予訪問MSysObjects 的權(quán)限
1. Open Microsoft Access
2. From the Tools menu, select the Options menu option
3. On the View tab, click the System Objects checkbox
4. Click OK to save your changes
5. From the Tools menu, select the Security -> User and Group Permissions menu option
6. Click the Permissions tab
7. Select the Table entry in the Object Type combo box
8. Select the Admin userid in the User/Group Name listbox
9. In the Object Name listbox, select the MSysObjects entry
10. In the Permissions group box, check the Read Data check box
工具-->選項(xiàng)-->視圖-->系統(tǒng)對(duì)象打勾
工具-->安全-->用戶與組權(quán)限-->對(duì)象名稱MSysObjects?,權(quán)限 讀取數(shù)據(jù) 打勾
OK,可以Access中訪問了,如果要在SQL SERVER 2005中訪問,可以在
select * from OPENROWSET('Microsoft.Jet.OLEDB.4.0','d:\SPS_Pool_Export-2007-data.mdb';'admin';'',MSysObjects)
如果出錯(cuò)
Msg 15281, Level 16, State 1, Line 1
SQL Server blocked access to?STATEMENT 'OpenRowset/OpenDatasource' of component 'Ad Hoc Distributed Queries' because this component is turned off as part of the security configuration for this server.?A system administrator can enable the use of 'Ad Hoc Distributed Queries' by using sp_configure.
?For more information about enabling 'Ad Hoc Distributed Queries', see "Surface Area Configuration" in SQL Server Books Online.
SQL Server2005沒有設(shè)置的原因
exec sp_configure 'show advanced options',1
reconfigure
exec sp_configure 'Ad Hoc Distributed Queries',1
reconfigure
轉(zhuǎn)載于:https://www.cnblogs.com/lwl0606/archive/2008/11/04/1326071.html
總結(jié)
以上是生活随笔為你收集整理的访问MS Access 系统表 MSysObjects ,在SQL SERVER 2005中访问的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: linux问答学知识
- 下一篇: 在windows 2008下不同域活动目