Solved

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

Posted on 2004-10-22
3,033 Views
Last Modified: 2009-06-24
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
0
Question by:tienluong
    6 Comments
     
    LVL 19

    Expert Comment

    by:drichards
    Is your SQL Server set up for "Windows ony" authentication?
    0
     
    LVL 12

    Expert Comment

    by:BobLamberson
    0
     
    LVL 1

    Expert Comment

    by:RonaldKunenborg
    I suggest you take a look at the SQL server setup, just as drichards said. I had the exact same problem.
    This is caused by the webserver trying to use the account under which the webserver is running to access the database. This account usually has NO permission to access the database.

    To solve it, set up SQL server to allow access by using accountname/password login.

    Also, if you are already using this way to access the database, try writing the connect statement anew. Maybe you overlooked a space or quote somewhere?

    Good luck,
    Ronald.
    0
     

    Expert Comment

    by:dileedil
    Dim connection

    set connection=Server.CreateObject("ADODB.Connection")
    connection.ConnectionString = "Provider=SQLOLEDB; Data Source=SourceName; Initial Catalog=CatalogName; User ID=sa; Password="
    connection.open

    Try to set Connecting String like this , This is a solution for you,
    Thanks
    0
     
    LVL 1

    Expert Comment

    by:RonaldKunenborg
    Hi TienLuong,

    if you answered the question, please share your answer with us so we may benefit in the future. The answers given above are the most straightforward ones, so if you have a really different problem your answer may help someone in the future.

    Regards,
    - Ronald.
    0
     

    Accepted Solution

    by:
    Closed, no points refunded.
    PashaMod
    Community Support Moderator
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Suggested Solutions

    INTRODUCTION We all know how to code. But at times you simply want to insert a common code block into your existing code and amend it as per your requirements. This tool not only saves you time but also saves you the pain of typing it all out aga…
    I know it’s not a new topic to discuss and it has lots of online contents already available over the net. But Then I thought it would be useful to this site’s visitors and can have online repository on vim most commonly used commands. This post h…
    Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
    In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

    856 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now