Microsoft KB Archive/266008

= FIX: Ad Hoc Access Denied Post SP2 with the Use of OPENROWSET =

Article ID: 266008

Article Last Modified on 3/14/2006

-

APPLIES TO


 * Microsoft SQL Server 7.0 Service Pack 2

-



This article was previously published under Q266008



BUG #: 57901 (SQLBUG_70)



SYMPTOMS
After applying SQL Server 7.0 Service Pack 2, a user may receive the following error message when using the OPENROWSET Transact-SQL function:

7415 - Ad hoc access to OLE DB provider '%ls' has been denied. You must access this provider through a linked server.

This can occur even when Ad Hoc Query Access has been explicitly allowed for the OLE DB provider being used.

The OPENROWSET function will succeed most of the time, but the error may occur a small amount of the time. The registry value DisallowAdhocAccess may also have to be added, depending on how the clients are connecting to SQL Server; see the table in the &quot;More Information&quot; section of this article for additional information.



CAUSE
A change was made in SQL Server 7.0 Service Pack 2 as detailed in the following article in the Microsoft Knowledge Base:

256052 FIX: Sqlservr.exe Non-Trusted Connection Through OPENROWSET

This altered the security behavior of the OPENROWSET function depending on the registry value of DisallowAdhocAccess for each OLE DB provider.



STATUS
Microsoft has confirmed this to be a problem in SQL Server 7.0. This problem has been corrected in U.S. Service Pack 3 for Microsoft SQL Server 7.0. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

274799 INF: How to Obtain Service Pack 3 for Microsoft SQL Server 7.0 and Microsoft Data Engine (MSDE) 1.0

For more information, contact your primary support provider.



MORE INFORMATION
For more information on the OPENROWSET function, see the &quot;OPENROWSET (T-SQL)&quot; topic in SQL Server 7.0 Books Online. For more information on the DisallowAdhocAccess registry value, see the &quot;Configuring OLE DB Providers for Distributed Queries&quot; topic in SQL Server 7.0 Books Online. The following are the rules governing the behavior of the DisAllowAdhocAccess registry key:

Additional query words: sp2 sp sp3

Keywords: kbbug kbfix kbqfe KB266008

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.