Microsoft KB Archive/814398

= PRB: Error 7399 When You Run a Linked Server Query That Uses the OLE DB Provider for Microsoft Jet =

Article ID: 814398

Article Last Modified on 7/11/2006

-

APPLIES TO


 * Microsoft SQL Server 2000 Standard Edition
 * Microsoft SQL Server 7.0 Standard Edition

-



SYMPTOMS
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.



CAUSE
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.



WORKAROUND
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  list, click TEMP, and then click Edit.</li> In theVariable Value box, type C:\Temp as the location of the new Temp folder, and then click OK.</li> Repeat steps c and d to set the value of the TMP variable.</li> Click OK two times.</li></ol> </li> Log off, and then log on to the computer by using SQL Server startup account.</li> Restart the SQL Server services.</li></ol>

<div class="references_section">