开发者

how to connect sql database that is not in the same LAN

开发者 https://www.devze.com 2023-04-08 10:37 出处:网络
I am trying to connect to sql server 2005 database. It\'s not in the same LAN. I am Gettingerror like

I am trying to connect to sql server 2005 database. It's not in the same LAN. I am Getting error like

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

in local LAN i am able to connect with using 'IP & TCP\IP port number' and 'instance name'

is there开发者_JS百科 any solution for this


Did you enable remote connections in SQL Server?
See this KB article by Microsoft "How to configure SQL Server 2005 to allow remote connections"


Talk to your network administrator - you don't seem have a route to that subnet from where you are on the network, OR the traffic is being block by a firewall, OR you have an incorrect port or IP in your connection string.


Probably it is not "not in your LAN" but "not reachable by your network". There is a high difference and without any additional information that is as good as you will get an answer.

Make sure you can establish a basic network connection first (i.e. for example PING or telnet to the port to see that it opens). It can be a firewall between telling you to get lost.


There can be lots of reasons for this.

The remote SQL Server is behind a firewall / traffic not routed properly / remote access is not enabled on the sql server / serverside software firewall etc.

You should probably lookup some tutorial on how to setup a Windows Server + MS SQL for remote connections.

0

精彩评论

暂无评论...
验证码 换一张
取 消