服务器无故出现了连接不上access数据库的问题,几十个正常的网站一下子都陷入瘫痪.有的提示"数据库连接出错,请检查连接字符串"(这是程序自己定义的防爆库措施),有的提示"处理URL时出错,请与管理员联系"(这是服务器的防止错误提示措施),有的则干脆直接了当地提示出错误信息,
Microsoft OLE DB Provider for ODBC Drivers 错误 ''80004005''
[Microsoft][ODBC Microsoft Access Driver]常见错误 不能打开注册表关键字 ''Temporary (volatile) Jet DSN for process 0x2d4 Thread 0x4b4 DBC 0x142314c Jet''。
有一些则说:
Microsoft OLE DB Provider for ODBC Drivers 错误 ''80004005''
未知错误
这些错误因为程序或都是服务器的设置不同面表现得千姿百态,其实错误就只有一个,权限问题.试着将管理员权限给与某个网站,那个网站一定可以正常运行.
有人是这么说的:
***********************************************
The above two error messages relate to the fact that the web server account does not have the rights to access the database.
Setting the following NTFS permissions will cure the errors above.
Task Permission User Accounts
Actual MDB Database File (*.MDB) Modify IUSR_CCROWE, IWAM_CCROWE
--------------------------------------------------------------------------------
Folder where the *.MDB file is located Modify IUSR_CCROWE, IWAM_CCROWE
--------------------------------------------------------------------------------
Temp Directories Modify IUSR_CCROWE, IWAM_CCROWE
Notes:
If you set the FOLDER permission first and then create your database the database will by default inherit the permissions from the folder.
The Modify NTFS permission in Windows 2000 is Change under Windows NT 4.
Change the IUSR_CCROWE used above to the user account that the web server is using
I have also found that the JET Engine creates temporary files as well, these normally get stored in the Temp directory (you can find the temp directory by going into Control Panel -> System -> Advanced - Environment Variables, I would set both the TMP and TEMP folders to allow Change Permissions for the IUSR account.
see also
http://www.iisfaq.com/default.aspx?View=A396&P=160
***********************************************************
以下则是微软提供的方案:
1. Start Registry Editor (Regedt32.exe).
2. Select the following key in the registry:
HKEY_LOCAL_MACHINE\SOFTWARE\ODBC
3. On the Security menu, click Permissions.
4. Type the required permissions for the account that is accessing the Web page.
5. Quit Registry Editor.
后来我根据服务器的设置,给系统盘temp文件夹给了everyone一个写权限,果然就可以了.只是现在还不知道当时为什么出错,因为根本就没人改过那些东东.