0

I installed SQL Server 2008 on a workstation running windows 7 SP1. I am trying to connect to the server through the internet using a static IP address and port 1433.

I can connect with this IP address on the same working station through the server management studio. However, when I try connection with a connection string from a remote computer, I get error 40.

If I enter a wrong user or wrong database name, I get a different error, which makes me think that the connection string connects to the server and can identify the database and the user, but does not continue to open the database. My connection string:

Data Source=***.***.**.**,1433;Initial Catalog=Hospital;Integrated
Security=False;User ID=*****;Password=******

1 Answer 1

0
  1. Check windows firewall ports are open. If needed - temporarily disable windows firewall.

  2. Check network connectivity between client and server via command line prompt:

    ping <server public ip>

    telnet <server public ip> 1433

Telnet must open a blank window with blinking cursor on it, press Ctl-C to exit. Otherwise - there is a network problem.

  1. Run SQL Server Configuration Manager on both client and server and temporarily disable all protocols except TCP/IP

  2. If nothing helps - restart service as recommended here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .