Thursday, August 28, 2008

Problem:

Export excel file from SQL Server 2005. In order to do SQL gave the attached error.

Solution:

Quote: (MSDN)

“By default, SQL Server does not allow ad hoc distributed queries using OPENROWSET and OPENDATASOURCE. When this option is set to 1, SQL Server allows ad hoc access. When this option is not set or is set to 0, SQL Server does not allow ad hoc access.”

MSDN Link: http://msdn.microsoft.com/en-us/library/ms187569.aspx

In order to turn this option on follow the link below

http://www.kodyaz.com/articles/enable-Ad-Hoc-Distributed-Queries.aspx

No comments: