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 2005 Forums
 SQL Server Administration (2005)
 Not able to connect to my SQL Server remotely

Author  Topic 

pras2007
Posting Yak Master

216 Posts

Posted - 2008-12-18 : 15:49:11
Hello All,

I’m tried to connect to my SQL Server remotely and I’m not having any luck. The error that I’m getting it shown below:

Error Message:
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 – Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 3)

Does anyone know what I need to do to my server in other to connect? Please advice. Thanks


tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-12-18 : 15:51:40
Try connecting with HostName,PortNumber. If that produces the same error, try telneting to it:

Start..Run..cmd. telnet HostName PortNumber

If you get a blank screen, then that's good. Otherwise, you've got a network issue such as a firewall issue.

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 - 2008-12-18 : 15:52:15
See my blog for more information: 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

koolkeith19
Starting Member

14 Posts

Posted - 2008-12-18 : 16:04:37
quote:
Originally posted by pras2007

Hello All,

I’m tried to connect to my SQL Server remotely and I’m not having any luck. The error that I’m getting it shown below:

Error Message:
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 – Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 3)

Does anyone know what I need to do to my server in other to connect? Please advice. Thanks






if it is possible restart the server, i have this happen due a restart and I have to execute the command
shutdown -i <servername>
type that at the run
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-12-18 : 16:12:10
Restarting the server is not a good idea. You can fix this through other means, meaning without any downtime to the database server.

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

Subscribe to my blog
Go to Top of Page

pras2007
Posting Yak Master

216 Posts

Posted - 2008-12-21 : 17:05:22
Thanks folks for your help I was finally able to connect to my SQL Server internally (inside my network), but fortunately I’m still not able to connect remotely (outside the network). The way I was able to connect was I created an alias by specifying the IP address of the SQL Server that I was trying to connect too under “SQL Server Configuration Manager”.

When I tried to connect outside the network I get the following error message:

Cannot connect to xxx.xxx.x.xxx.

------------------------------
ADDITIONAL INFORMATION:

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: TCP Provider, error: 0 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.) (Microsoft SQL Server, Error: 10060)

Does anyone know what is needed to be configured next to resolve this problem? Please advice.

Thanks.
Go to Top of Page

hey001us
Posting Yak Master

185 Posts

Posted - 2008-12-21 : 17:11:23
Its seems firewall issue. did you tried Tara "Start..Run..cmd. telnet HostName PortNumber" command?

You need to give sql port & RPC permission in your firewall access point.

hey
Go to Top of Page

pras2007
Posting Yak Master

216 Posts

Posted - 2008-12-21 : 19:36:52
Thanks for the response folks, I have tried the following on the client side:

servername,1433
XXX.XXX.X.XXX,1433
tcp:servername,1433
tcp:XXX.XXX.X.XXX,1433

The above connection method was produced from tkizer pervious solution. None of them resolve my issue.

I preformed the following test on the Server side:

- telnet servername 1433 (Showed blank screen)
- telnet XXX.XXX.X.XXX 1433 (Showed blank screen)

I preformed the following test on the client side:

- telnet servername 1433 (Received an error)
'telnet' is not recognized as as internal or external command, operable program or batch file.

- telnet XXX.XXX.X.XXX 1433 (Received an error)
'telnet' is not recognized as as internal or external command, operable program or batch file.

What is meant by firewall? Are you referring to Windows firewall on the "server side" or the "client side"? Please advice. Thanks.


Go to Top of Page

hey001us
Posting Yak Master

185 Posts

Posted - 2008-12-21 : 21:03:00
I mean your company network firewall rules, not windows firewall. you need to enable the RPC on the SQL Server or restart to RPC Service if you dont have any firewall rule. try this telnet /?
I believe the telnet is not available on your server to test the command if the above command nothing shows.

are you using Remote Desktop or SQL to connect the remote sql?

Right click to Linked Server Name -> property -> select Server options tab
Enable Rpc property to True if you’re connecting through linked server name.

hey
Go to Top of Page

pras2007
Posting Yak Master

216 Posts

Posted - 2008-12-21 : 22:44:45
Thanks everybody the problem was resolved... The problem was I needed to set up port forwarding on my Linksys router, once that was done I was able to connect outside my domain. Once again thanks all!!
Go to Top of Page
   

- Advertisement -