Sunday, February 12, 2012

Connecting to SQL SERVER over the Internet comes up with access denied error

I have set up an MSDE SQL Server in my Win XP Pro PC and am able to connect to it on the host PC, and over my LAN. However, when I try to connect to it over the Internet my connection is refused with the following message:
SQL server does not exist or access denied. ConnectionOpen (Connect())
Some background:
I have router/NAT firewall and have opened port 1433 (I have even tried a DMZ to the SQL Server machine). The Router is definitely going to the SQL Server PC! I am fairly certain that the connection string is correct.
Any help would be most gratefully received.

Try connecting to the SQL Server from your web server and make sure you can connect from there. If not, you will need to get a dedicated connection the server.
Are you using an aliased connection name for the server like DBServer or something instead of the IP? If so, make sure it is in DNS or your web servers host file.

Nick|||

Hi

Sorry for the delay... Had to shoot off elsewhere... Does this mean I have to have web services up and running on the PC that is hosting the SQL Database?

Thanks

Paul

|||

It Depends. How are your web pages connecting to your sql server? Do you have 2 seperate boxes, one for web site other for sql server, or is it all on one server? Can you show your connection string to your server (remove the user name password info)?

Nick

|||

Currently done have a web server at all! I am just trying to connect to the SQL database using an internet connection. I can use either a direct IP or NO-IP.com to connect to the PC. Its once I'm on the PC that I get kicked out by the SQL server.

Thanks

Paul

|||

It sounds like you can make a connection to the server, but cant get authorization into the server? Try this:

Start>Control Panel>Admin Tools>Data Sources(ODBC)>System DSN>Add>SQL Server.
In the name, enter anything you want. For the server, enter the IP address and click next. Depending on how you connect (either with windows NT or SQL Server info into the machine, you will need to check the corresponding radio button. If you use NT and a different user name for SQL, uncheck the checkbox and enter your credentials and click next. If something is incorrect, it will tell you here. If not, you can make a good connection to your server. Let me know what it returns.
Nick

|||

Hi! i'm having the same issue as Paul. I added the new datasource and it came up with this error:
Microsoft SQL Server ODBC Driver Version 03.85.1025

Running connectivity tests...

Attempting connection
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]SQL Server does not exist or access denied.

TESTS FAILED
i'm doing everything through NT auth and i'm on 2 servers. My work won't allow me to have an IIS and a SQL server on the same machine.
Any help would be great! thanks
Joel

|||The Network configuration of SQL Server can be accessed at the Server properties in Enterprise Manager, if you don't have access tell who have access to configure it. Let me explain you are connecting to SQL Server through either Named Pipes, NWLink IPX/SPX, Apple Talk, Banya Vine and VIA but not TCP/IP so you or who have access have to make the changes in the Network Configuration section of Enterprise Manager. Hope this helps.

No comments:

Post a Comment