This article has been archived. It is offered "as is" and will no longer be updated.
If you run a linked server query, and you configured the linked server to use the OLE DB Provider for Microsoft Jet, the query may not be successful, and you may receive the following error message:
Error 7399: OLE DB provider 'Microsoft.Jet.OLEDB.4.0' reported an error. [OLE/DB provider returned message: Unspecified error] OLE DB error trace [OLE/DB Provider 'Microsoft.Jet.OLEDB.4.0' IDBInitialize::Initialize returned 0x80004005: ].
If you browse the linked server in SQL Server Enterprise Manager, you may also receive the following error message:
Error 7399: OLE DB provider 'Microsoft.Jet.OLEDB.4.0' reported an error.
This problem occurs because the login account does not have full access to the temporary folder of the SQL Server startup account. The linked server query runs in the context of the login account. If you run a linked server query, SQL Server tries to create a temporary file data source name (DSN) in the temporary folder of the SQL Server startup account.
To work around this problem, follow these steps:
Log on to the computer by using the SQL Server start up account.
Create a folder named Temp in the operating system installation directory.
Permit full access to a non-administrator account on the Temp folder.
Set the value of the TEMP and TMP user variables of the SQL Server startup account to the newly created Temp folder. To do so, follow these steps:
Right-click My Computer, and then click Properties.
Click the Advanced tab, and then click Environmental Variables.
In the User variables for Logon User list, click TEMP, and then click Edit.
In theVariable Value box, type C:\Temp as the location of the new Temp folder, and then click OK.
Repeat steps c and d to set the value of the TMP variable.
Click OK two times.
Log off, and then log on to the computer by using SQL Server startup account.
Restart the SQL Server services.
For additional information, click the following article numbers to view the articles in the Microsoft Knowledge Base:
296711 PRB: "Unspecified error" Error 7399 Using OPENROWSET Against Jet Database