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

BUG #: 57901 (SQLBUG_70)

Symptoms

A supported fix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Apply it only to computers that are experiencing this specific problem. This fix may receive additional testing. Therefore, if you are not severely affected by this problem, Microsoft recommends that you wait for the next SQL Server service pack that contains this hotfix.

To resolve this problem immediately, contact Microsoft Product Support Services to obtain the fix. For a complete list of Microsoft Product Support Services phone numbers and information about support costs, visit the following Microsoft Web site:NOTE: In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The typical support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

The English version of this fix should have the following file attributes or later:


Date Time Version Size File name Platform
-------------------------------------------------------------------

06/06/2000 04:24 7.00.872 4913 KB s70872i.exe Intel
06/06/2000 04:24 7.00.872 11,329 KB s70872a.exe Alpha
NOTE: Due to file dependencies, the most recent hotfix or feature that contains the above files may also contain additional files.

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 "More Information" 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 "OPENROWSET (T-SQL)" topic in SQL Server 7.0 Books Online. For more information on the DisallowAdhocAccess registry value, see the "Configuring OLE DB Providers for Distributed Queries" topic in SQL Server 7.0 Books Online. The following are the rules governing the behavior of the DisAllowAdhocAccess registry key:


Registry settingDescription
DisallowAdhocAccess=1Ad hoc access will always be denied on the provider.
DisallowAdhocAccess=0Ad hoc access will always be allowed on the provider.
DisallowAdhocAccess does not exist (SQL Server 7.0 Service Pack 2 has not been applied yet)Ad hoc access will always be allowed on the provider.
DisallowAdhocAccess does not exist (SQL Server 7.0 Service Pack 2 has been applied)Ad hoc access will be allowed for members of the SysAdmin server role and for Windows NT security connections, and will be disallowed for normal users using standard security connections for this provider.
Eigenschaften

Artikelnummer: 266008 – Letzte Überarbeitung: 22.06.2014 – Revision: 1

Feedback