Wednesday, July 8, 2009

SQL Server blocked access to STATEMENT 'OpenRowset/OpenDatasource'

ถ้าเกิดปัญหา run query openrowset หรือ opendatasource ไม่ได้เกิด error message ดังนี้

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.

ให้ทำดังนี้







หลังจากนั้นลอง run query openrowset อีกครั้ง

1 comment:

  1. Thank you very much.

    ขอบคุณมากครับ กำลังหาอยู่เลย ไม่นึกว่าจะมาเจอที่เป็นคนไทยเขียน ^^ เป็นกำลังจัยให้คับ

    ReplyDelete