views:

1456

answers:

7

I have an application that runs fine when executed off the server. When clients try to connect, they receive the following error:

Failed to get data. *Data provider could not be initialized *SQL Server does not exist, or access denied

on my Office Web Components (MDAC). I am guessing there is some security or server configuration error, but I'm not able to pinpoint it. I am running SQL Server 2005.

*Note - clients can't change their security settings, company policy.

A: 

Your firewall settings might be preventing connections from your clients. If not, it can be a DNS issue.

Otávio Décio
what kind of DNS issue am I looking for?
Sheehan Alam
The standard - you can't resolve the server address. Try to ping or tracert it from a command prompt where the code trying to access SQL Server is failing. The TELNET command suggested here is useful too.
Otávio Décio
A: 

Most likely an issue with your firewall not allowing remote connections?

TheTXI
client firewall cannot be modified
Sheehan Alam
It's not a client firewall issue. The respondants are talking about any firewall between the application server and the database server.
Robin M
+3  A: 

When you try this from a command prompt:

TELNET servername 1433

What happens? If you get a blank screen, then SQL Server is listening and you've got something wrong in your client settings. If you get an "Access denied" or "no response"-type answer, it's most likely either a firewall issue or SQL Server isn't listening, but in either case, it's a server issue.

rwmnau
could not open connection to the host, on port 1433: connect failedwhat do I need to do make the connection work?
Sheehan Alam
Sounds like a client firewall issue
JoshBerke
i ran telnet on the server, not the client
Sheehan Alam
If you ran TELNET on the server and still got this message, then I'll bet SQL Server isn't listening on TCP/IP. Open the "Server Configuration" on the server, check the protocol list, and make sure that TCP is enabled.
rwmnau
enabling TCP/IP did the trick!
Sheehan Alam
A: 

If it's working from the server but clients are having problems, I think the "access denied" part of the error is the key here and it's an authentication problem.

What sort of authentication are you using to authenticate your clients? Is the server using impersonation? If you're running clients and server in an active directory domain, the client application (Office or Internet Explorer for example) might be passing credentials to the server which the server is using to authenticate to the database.

Robin M
i have enabled anonymous access in IIS
Sheehan Alam
Have you disabled the other authentication methods?
Robin M
+2  A: 

SQL Server 2005 disables network accessibility by default, you might need to enable it

http://msdn.microsoft.com/en-us/library/ms165647(SQL.90).aspx

cmsjr
enabling Named Pipes, TCP/IP and VIA under network configuration actually prevented the server from connecting to the database
Sheehan Alam
Although a good point in general, I disagree in this case.The application works when executed from the server which suggests authentication issues to me.
Robin M
A: 

For SQL Server to be contactable from a network machine it requires port 1433 to be open on the server for TCP traffic. Additionally, if you have a named instance you should check the port it is listening on as it may be different to the the default and will probably need to be opened. You will also have to open up port 1434 for UDP to support the SQL Browser Service

A: 

firewall issue. diable firewall, run instance again

roz