Link to home
Start Free TrialLog in
Avatar of tienluong
tienluong

asked on

Microsoft OLE DB Provider for SQL Server error '80004005' unable to connect remotely to database

Dear experts,
I have an ASP file on a webserver that needs to connects to a database server remotely. But for some reason it doesn't allow me to do so. I know it is not the database server problem because I tried connecting to it with another computer and IT WORKS data comes out. I tried using a DSN connection on the web server and "TESTS COMPLETED SUCCESSFULLY", but I still cant' get the data to come up on my ASP page.


the error on the ASP page is
Microsoft OLE DB Provider for SQL Server error '80004005'
 "client unable to establish connection"

 I've also tried directly connecting to SQL server which still doesnt' work.

the error on the ASP page is
Microsoft OLE DB Provider for SQL Server error '80004005'
[DBNMPNTW]Access denied.


 I'm pretty sure that it is the web server restricting access but don't know how to unenable it. Any suggestions would be appreciated. I'm on a company network. Is this a problem? I'm getting desperate on this one.

Peter
ASKER CERTIFIED SOLUTION
Avatar of Asta Cu
Asta Cu
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ryerras
ryerras

This should fix your problem

the following snippet is from the microsoft article following

/*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC SQL Server Driver]Client unable to establish connection


CAUSE
This error occurs if SQL Server security mode is set to Microsoft Windows NT only and the NT account that is being used to authenticate the user on the IIS computer (such as IUSR_computer for anonymous IIS access) does not have permissions to connect to the remote SQL Server's NT computer.
RESOLUTION
Using IIS Anonymous Access1. Using NT's User Manager Tool, create an identical NT account, such as IUSR_localcomputer, on the remote SQL Server's NT computer. Give the account a similar password and give it the right to "Log On Locally."
2. Using Internet Service Manager, open the Properties Sheet of the virtual directory for the Web application, select the Directory Security tab, click on the Edit button for Anonymous Access and Authentication Control to display the Authentication Methods. Click the Edit button for Allow Anonymous Access to edit the NT account used for anonymous access, and then clear the check box Enable Automatic Password Synchronization. Save the changes by clicking OK to close the dialog box.

This second step is necessary because of account delegation issues with NT.
Using IIS Basic Authentication1. Refer to the preceding steps if users sign on to IIS using accounts local to the NT server with IIS when prompted for the user name and password by the browser.
2. If users sign on by using a domain account and both NT computers for IIS and SQL Server are in the same domain, ensure that the accounts have the right "Access This computer from a Network" on the SQL Server's NT computer, either directly or indirectly, based on the rights assigned to a group of which the account is a member.

/*---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
http://support.microsoft.com/kb/253500/EN-US/
Avatar of tienluong

ASKER

Yes, the MDAC was old. Once I upgraded the MDAC it works fine. Thats to all for the help.
I had the same issue.  Thanks for the good news and fine grade.  I'm so pleased it helped you.
":0) Asta