Search code examples
sql-serversql-server-2008portserver-configuration

Could not open connection to the host, on port 1433: Connect failed


When I try to connect from an application to a SQL Server environment on the same machine, the connection fails. I tried to telnet to following

telnet 127.0.0.1 1433

but I got following message:

Could not open connection to the host, on port 1433: Connect failed

enter image description here

Note: When I tried to ping, it was successful.

I need to enable port number 1433 on SQL Server. I am using SQL Server 2008 client (management studio) and SQL Server 2008 Express engine.


Solution

  • The YouTube video How To Connect SQL Server with Internet solved my problem, at the 5:32 mark.

    Steps to enable port number 1433 on MS SQL Server 2008:

    1. Open the Start Menu
    2. Select "All Programs"
    3. Find the "SQL Server 2008" folder
    4. Select "Configuration" Tools
    5. Select "SQL Server Configuration Manager"
    6. On the left side of a new window, select "SQL Server Network Configuration"
    7. Select "Protocols for SQLEXPRESS"
    8. Select the "TPC/IP" option which is on the left panel
    9. On the "Protocol" tab, if "Enabled" is set to "No" then set it to "Yes"
    10. Then select on the "IP Address" tab
    11. Scroll down to the last option of "IPALL"; set the "TCP Port" as 1433
    12. Select "Apply" and then the "Ok" button.