Thursday, March 22, 2012

Connecting to Remote SQL Server

Hi all,

I have been encountering problems in connectiing to an sql server remotely. I have a SQL Server installed on a machine with a public IP. I am, running an application on one of my other Servers having a Public IP as well. Now i want to access the SQL Server Database of my first machine from my second machine, but i cannot get connected to it. I give the IP address of the machine in the connection string but it fails. I have also tried it with the port number. What could possibly be the solution for a problem like this ?

Regards.

Hi there,

Maybe It caused by your windows firewall ! the initial status of Windows Firewall is on.
Check the status by turning off your windows firewall on SQL Server machine.

Babak Izadi
LotraSoft Ltd.

|||

By default, SQL Server 2005 does not allows remote connections. To configure SQL Server 2005 to allow remote connections, complete all the following steps:

1.Select the SQL Server Surface Area Configuration tool from the Configuration Tools and then click Surface Area Configuration for Services and Connections option. expand Database Engine, click Remote Connections, click Local and remote connections, click the appropriate protocol to enable for your environment, and then click Apply and Ok for restarting the Database engine service.

2. Try adding sqlservr.exe (present in MSSQL.1\MSSQL\Binn directory for the default instance and \MSSQL$instance_name\Binn directory for the named instance) in the list of allowed firewall exceptions on the Windows 2003 box.

Regards,

Rajesh

|||

Can the two servers ping each other?

from serverA run in a command prompt: "ping serverB"

from serverB run in a command prompt: "ping serverA"

If one of the two fails, you probably have a network problem

Else look at the above post's (Rajesh) instructions

|||Can you check whether there are any issues with WINS issue on the network, ifyou are not able to register with name as explained you might try PING between the boxes and also check the firewall exception in this case to avoid any other barrier.

No comments:

Post a Comment