PRB: "Unspecified error" Error 7399 Using OPENROWSET Against Jet Database

Article translations Article translations
Article ID: 296711 - View products that this article applies to.
This article was previously published under Q296711
Expand all | Collapse all

SYMPTOMS

When you run a query by using the OPENROWSET function against a Jet database, this error message occurs:
Server: Msg 7399, Level 16, State 1, Line 1
OLE DB provider 'Microsoft.Jet.OLEDB.4.0' reported an error.
[OLE/DB provider returned message: Unspecified error]

This problem also occurs with any linked server query that uses the Jet provider, such as the OPENQUERY function or the Transact-SQL query with four-part names.

CAUSE

The Jet engine needs to create temporary files. To create the temporary files, the Jet engine uses the TEMP and TMP system environment variables. If the TEMP and TMP system environment variables do not exist, Jet uses the %WINDIR% folder. If the SQL Server service account does not have permissions to create, write, delete and read files in the %WINDIR% folder, or to the folder pointed to by the TEMP or TMP system environment variable, the error occurs.

WORKAROUND

To work around this problem, use of the the following two methods.

Method 1
  1. Configure the TEMP and TMP system environment variables to point to a folder (for instance, C:\TEMP).
  2. Set the permissions to the SQL Server service account on this folder as Full Control.
  3. Restart the server.

Note In addition to granting full control to the SQL Server service account, any user that connects to the computer that is running SQL Server by using Windows Authentication must also be granted full control to the same TEMP and TMP directories that the SQL Server service account uses. Before you instantiate the OLEDB provider, SQL Server impersonates the account that is connecting to the computer that is running SQL Server if it is using a trusted connection.

Method 2
  • If there is not a TEMP or TMP system environment variable, set the permissions to the SQL Server service account on the %WINDIR% folder as Full Control -or-

  • Make the SQL Server service account a member of a group that has such permissions on the %WINDIR% folder.

Properties

Article ID: 296711 - Last Review: December 1, 2003 - Revision: 4.2
APPLIES TO
  • Microsoft SQL Server 2000 Standard Edition
  • Microsoft SQL Server 7.0 Standard Edition
Keywords: 
kbprb KB296711

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com