I have setup a server that runs Windows Server 2008, and has SQL Server 2008 Express installed.

I can connect to the machine's SQL Server Express database via the MACHINENAME/SQLEXPRESS.

However when we come to connecting through any software or script using an IP Address it won't allow the connection.

I have tried:

  • Turning off the Firewall.
  • Allowing Remote Connections for the SQL Database.
  • Enabling TCP/IP within the SQL Configuration.

When we attempt to connect via the software 'SQL Server Management Studio', we get the following message:

Error Message:

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: TCP Provider, error: 0 - No connection could be made because the target machine actively refused it.) (Microsoft SQL Server, Error: 10061)

A connection was successfully established with the server, but then an error occurred during the login process. (provider: TCP Provider, error: 0 - An established connection was aborted by the software in your host machine.) (Microsoft SQL Server, Error: 10053)

Can you please let me know when your free so we can take a look because I seem to be getting know where, I’ve amended the details as per some information UK Fast sent me but they have said "It’s not within the support remit", so they can’t help any further.

I look forward to hearing from you.

migrated from stackoverflow.com Mar 31 '14 at 14:34

This question came from our site for professional and enthusiast programmers.

  • Have you tried appending the port number when connecting? – TTeeple Mar 31 '14 at 13:00
  • Are you trying to connect to "192.168.0.1/SQLEXPRESS" (where 192.168.0.1 is really your server's IP address), or are you omitting the instance name? – Rowland Shaw Mar 31 '14 at 13:27
  • 2
    Are you really using a forward slash / and not a back slash `\`? – Aaron Bertrand Mar 31 '14 at 14:49
up vote 46 down vote accepted

Your SQL Server is installed as named instance, so first of all try connecting to your server using the following server name: IP Address\SQLEXPRESS.
When you install SQL Server as named instance it uses dynamic TCP/IP ports by default, so it is not possible to connect to it whitout specifying instance name (just IP address). If you need to connect to your server without using instance name you have to reconfigure your server to use static TCP port. To do it please perform the following:

  1. open SQL Server Configuration Manager;
  2. switch to the SQL Server Network Configuration | Protocols for SQLEXPRESS;
  3. double-click the TCP/IP protocol;
  4. select the Yes value in the Enabled field;
  5. switch to the IP Addresses tab;
  6. find the IPAll section;
  7. clear the TCP Dynamic Ports field in that section;
  8. specify the 1433 value in the TCP Port field:
    enter image description here
  9. restart your server
    Try to connect to your server using just its IP address.
  • 5
    Thank you for providing that information, it works just fine except for one thing. In sql management studio I still have to provide the port to connect to the server, like, x.x.x.x\instance,1433. I think that's sort of weird since I'm using the standard port. – Tomas Jansson Oct 22 '14 at 17:35
  • 1
    It worked for me, except for exactly the opposite of what @TomasJansson reported: it works in the Management Studio without a port number, but I have to specify one in my connection string even tough I'm using the default port (1433). – lpacheco Jul 24 '15 at 14:03

You should enable , following for me the issue solved by enabling following and restarting all service.

  • Shared Memory
  • TCP/IP
  • Named Pipes

SQL Server Configuration Named Pipes

Using SQL Server Express 2017, in addition to the answers above, when trying to connect using the port, ensure you use the comma syntax, not the colon syntax: i.e. MyServerName,1433\InstanceName After wrestling with the above for a couple hours, following all of the suggestions, and it still not connecting, I used the above instead, and it connected right away through the SQL Server Management Studio remotely. A first step to success.

  • This fixed it for me (moving the port between the server name and instance name). Entering the port at the end didn't work. – masospaghetti Apr 27 at 19:46

Just adding on to what has been previously said. I had the same issue of not being able to connect to the server (client and server on the same desktop) and I ran through all the steps listed here trying to fix it. However, I eventually found out what the issue was. All I had to do was go into SQL server management studio and click "SQL server services" and then single-click the server I needed to connect to. Then click the green 'run' button. I'm not sure if this was specific to me since my computer was both running and accessing the server, hope it helps anyone else out there though!

Where the run/start button is

  • how on earth has this comment been so underrated? simple and fixed my issue asswell – Cavid Hummatov Jul 17 at 6:18

protected by Community May 23 at 9:25

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.