Skip to content Skip to sidebar Skip to footer

Sqlserverexception: Tcp/ip Connection To The Host Has Failed

When I am running an Web application, I get an error message 'The TCP/IP connection to the host,port 1433 has failed. Error: 'connect timed out. Verify the connection properties

Solution 1:

Remove All the TCP Dynamic Ports and Add value of 1433 to all TCP Port and restart your SQL Server

Steps

  • Open the Sql Server Configuration Manager (Start -> Programs -> Microsoft SQL Server 2008 -> Configuration Tools)
  • Expand SQL Server Network Configuration -> [Your Server Instance]
  • Double click TCP/IP
  • Under Protocol:Ensure Enabled is Yes
  • Under IP Addresses:Scroll to the bottom and set the TCP Port under IPAll, (1433 by default)
  • Find the IP address you want to connect to and set Enabled and Active to Yes

Solution 2:

I had the same problem while i was trying connect to MSSQL Server remotely using JDBC (dbeaver on debian). After a while, I found out that my Windows Firewall configuration was not set up correctly. So maybe this could help you!

Here's how to configure Windows Firewall to allow network traffic that is related to SQL Server and to the SQL Server Browser service. Four exceptions must be configured in Windows Firewall to allow access to SQL Server:

  1. Create a port exception for TCP Port 1433:

    1. Open Windows Firewall with Advanced Security
    2. In the left pane, right click on Inbound Rules -> New Rule to get the wizard
    3. What type of rule would you like to create? Select Port
    4. Select TCP and specify port 1433
    5. What action should be taken when a connection matches the specified conditions? Allow the connection
    6. When does the rule apply? Choose all three profiles (Domain, Private & Public)
    7. Name the rule “SQL – TCP 1433″
  2. Add a port exception for UDP Port 1434:

    1. Right click on Inbound Rule, click New Rule again and use the following information to create another port
    2. Select Port
    3. Select UDP and specify port 1434
    4. Allow the connection
    5. Choose all three profiles (Domain, Private & Public)
    6. Name the rule “SQL – UDP 1434"
  3. Add a program exception for sqlservr.exe:

    1. Click New Rule again and use the following information to create a program exception:
    2. Select Program
    3. Click Browse to select ‘sqlservr.exe’ at this location: C:\Program Files\Microsoft SQL Server\MSSQL11.INSTANCE_NAME\MSSQL\Binn\sqlservr.exe where INSTANCE_NAME is the name of your SQL instance.
    4. Allow the connection
    5. Choose all three profiles (Domain, Private & Public)
    6. Name the rule "SQL – sqlservr.exe"
  4. Add a program exception for sqlbrowser.exe:

    1. Click New Rule again and use the following information to create another program exception:
    2. Select Program
    3. Click Browse to select sqlbrowser.exe at this location: C:\Program Files\Microsoft SQL Server\90\Shared\sqlbrowser.exe
    4. Allow the connection
    5. Choose all three profiles (Domain, Private & Public)
    6. Name the rule "SQL - sqlbrowser.exe"

Source: http://blog.citrix24.com/configure-sql-express-to-accept-remote-connections/

Post a Comment for "Sqlserverexception: Tcp/ip Connection To The Host Has Failed"