SQL Server does not exist or access denied.

Posted on 2007-10-02
Last Modified: 2012-06-22
Attempting to connect to a sql server that resides on one server from a web application that resides on another server.

Created a user in sql server and ensured it had permissions set for the database tables it needed to access.

Created a DSN on the web app server using the same user_id and password.

Checked Connection settings in sql server to make sure it was allowing more than one connection

Ensured SQL was running in mixed mode authentication

Tried using a variety of connection strings in my app and none of them would work  I keep getting the following error.

Microsoft OLE DB Provider for SQL Server error '80004005'

[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.

/dashboard/modules/dataTable.asp, line 30

Here is the last connection string I tried using.

"provider=sqloledb.1; user id=aaaaa; password=bbbbb; data source=xxxxx; initial catalog=yyyy"

I'm at a loss...  

Question by:GPadmin
    LVL 25

    Accepted Solution

    data source=xxxxx;

    make sure this is either the FQDN of the server, or the IP address
    LVL 19

    Expert Comment

    Couple quick things people sometimes overlook:
    check if server is using windows auth or sql login.  You may be passing windows credentials to the server,
    Check login  and user mapping in sql are correct,
    Check login is granted database permissions.  Some users here with me will grant object permissions to a user who does not also have database permissions set correctly.  The queries using the login's credentials fail.
    LVL 7

    Expert Comment

    Open a notepad. Save it as test.udl. Reopen it and create the connectionstring. Test the connection. If everything is fine then open the same file using notepad and copy the connection string and use in your app.


    Have a nice day

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
    The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
    Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
    Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

    794 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