Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 352
  • Last Modified:

SQL Server does not exist or access denied.

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


0
GPadmin
Asked:
GPadmin
1 Solution
 
kevp75Commented:
data source=xxxxx;

make sure this is either the FQDN of the server, or the IP address
0
 
folderolCommented:
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.
0
 
assystCommented:
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.

Thanks,

Have a nice day
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now