Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 Remote connection problem

Author  Topic 

Esteban
Starting Member

6 Posts

Posted - 2010-03-24 : 17:13:29
Hi.

I'm having a problem trying to configure sql server 2008 for remote connection. I'm testing the connection by creating a udl file.
I can access locally via the server name but i need to access it with my public ip so that a program made in vb6 can connect.
I saw this issue in many forum but ive already tried all of the solutions mentioned. I have tcp ip enabled, and windows xp (sp2) firewall disabled. I connect through a router and if i didn't do it wrong i opened the 1433 port for sql.

The error i get is:

microsoft sql server native client 10.0: login timeout expired.
- A network-related or instance-specific error has ocurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL server is configured to allow remote connections.

Named pipes provider: could not open a connection to sql server.

Im not sure about that last message..

Thanks in advance!


Esteban
Starting Member

6 Posts

Posted - 2010-03-24 : 17:19:40
I will correct my post, last message appears if i dont specify the instance name which was not the case. If i specify servername/instancename works, but by using an alias that points to my public ip appears the message i posted before plus:

tcp provider: cant establish connection since server denied connection
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-03-24 : 18:58:26
The simplest way to verify if the router/network are setup correctly is to telnet to it. From the client machine in a cmd window, type in "telnet ipAddress 1433" without the double quotes. If you get a blank screen, then it is setup properly. If you get an error, then the communication wasn't allowed.

Are you sure that SQL Server is listening on port 1433 though? Check the Error Log to see what it's listening on.


Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-03-24 : 18:58:58
Here's my blog post regarding how to troubleshoot it: http://weblogs.sqlteam.com/tarad/archive/2008/05/23/60609.aspx

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

Esteban
Starting Member

6 Posts

Posted - 2010-03-24 : 21:22:46
I checked the logs, and the port is 1433. I did the netstat:

netstat 192.168.1.34 1433 and by the looks of things it responds
but it doesn't if i do something like netstat <publicip> 1433.

I logged in on the server management studio these ways:

tcp:192.168.1.34,1433 . Connection Ok
<hostname>\SQLEXPRESS . Connection Ok

I just can't connect through my public ip (applications should connect that way)

PD: i read your blog
Go to Top of Page

Esteban
Starting Member

6 Posts

Posted - 2010-03-24 : 21:24:41
sorry i meant telnet instead of netstat
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-03-24 : 21:53:49
I'm not a network person, but can't your router redirect traffic from the public IP to the internal one?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

Esteban
Starting Member

6 Posts

Posted - 2010-03-25 : 11:04:50
i opened the ports for redirecting but apparently i'm not doing it the right way since it's not redirecting. I will try dissabling the router funcionality to make it act as a regular modem. Anyway i think this is now not sql related. Thanks for the help.

Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-03-25 : 15:47:50
You're welcome, sorry we couldn't get it fully working for you.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

Esteban
Starting Member

6 Posts

Posted - 2010-03-27 : 14:27:29
I solved my problem by opening the ports in my router plus, the tests that i was doing weren't completely right. Doing a telnet to my public ip was wrong in the first place because i can't reference myself. I asked a friend of mine to do the telnet and worked.

Thanks so much for the help
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-03-27 : 20:41:52


Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -