SQL Server slow response when accessed from a remote client We have a SQL Server in a remote location. If we access the server from the same location (internal IP, same IP as the server is using) the performance is good. We don't face any problem with connectivity.

But whenever we try to connect from a remote client (public IP) we are faced with a timeout error.

I have made an etc/host entry for the server.

What might be the reasons for such problems?   

I have connected via ODBC in Management Studio. The connection has been established. I am facing the problem only when executing queries (any query).
By default SQL Server instances don't listen for TCP/IP connections, so verify that this is enabled:


https://technet.microsoft.com/en-us/library/hh231672(v=sql.110).aspx
https://stackoverflow.com/questions/2388042/connect-to-sql-server-2008-with-tcp-ip


Also you need to make sure that firewalls between your client and the server are not blocking the connection. For the default instance under standard configuration TCP port 1433 needs to be open. If you have multiple instances then things get more complicated. See https://msdn.microsoft.com/en-us/library/cc646023.aspx for more details.

These are the most common cuases of complete failure to connect to a remote server. If all this is configured correctly then, as Tom V suggests, we need more information in order to be able to help.

Warning: It is strongly recommended that you do not open your SQL server ports to the Internet at large. If you allow connections in from the outside network then make sure you limit it to specific source IP addresses. If you can not do this because the source address(es) are variable (for example if you need to connect from a laptop that moves between networks a lot) then consider instead setting up a VPN to allow access through the firewall that way instead of directly. Even for a single fixed source address, I would still tend to prefer the VPN option.