Until yesterday evening, I was able to connect to my server from my local machine. Now, I get the following error:

A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: SSL Provider, error: 0 - The wait operation timed out.) (.Net SqlClient Data Provider)

Note, I can log on to the actual server with no problem.

Yesterday, I installed IIS on my machine and set up a site using my IP address - don't know if this has anything to do.

I did come across this article, followed the steps, but didn't seem to help.


I also went through the following article, changed TC/IP settings, restarted, but nothing.


Started trying suggestions from comments too but stopped when I realized I might be messing things up more.

So, why is this happening / how can I fix?

  • What version of SQL Server is this? How are you attempting to connect to the SQL machine; using SQL Server Management Studio or an app you developed, etc? Have you tried restarting the SQL Server service and the server machine? Aug 30, 2012 at 21:26
  • The server is 2008, my local sql is 2012. Tried it through an app I developed, as well as SSMS. Restarted Sql service on my machine, but didn't restart the actual server (will affect production, also, it's only a problem with my local SQL connecting).
    – Rivka
    Aug 30, 2012 at 21:45
  • Is it a default SQL instance? If so run netstat -ao and confirm that port 1433 is listening and that the PID belongs to sqlservr.exe. If it is listening, check that TCP/IP is enabled for the IP address that you're actually connecting to in SQL Server Configuration Manager (as Max has shown, but also open up the properties of TCP/IP and ensure that the correct IP is enabled). Aug 30, 2012 at 22:27
  • Looking at the service properties, my machine has SQLEXPRESS, not 2012. It was SSMS that was 2012 (which probably makes no difference?). @ChrisMcKeown - don't see 1433 listed there. Also, what should the IP address be? My local? Thanks guys, sorry for switching the variables here.
    – Rivka
    Aug 31, 2012 at 2:12
  • 1
    Also if you look in the SQL error logs you can also wee what port it is listening on: 2012-09-04 09:12:58.74 Server Server is listening on [ <ipv4> 64746].
    – shiitake
    Sep 5, 2012 at 14:25

13 Answers 13


In my situation, I had a content filter/proxy called Covenant Eyes that was the likely cause.

I tried repairing the install of SQL server 2012 and it crashed the install and still did not fix the problem. As soon as I generated an uninstall code and uninstalled the filter, I could connect; I did not even have to reboot.

Check for proxies and content filters on the machine and disable them!

  • WOW. This was a while ago, but we did and still do have Covenant Eyes installed on our machines.
    – Rivka
    Mar 12, 2013 at 21:12
  • I'm going to let them know of my issue... maybe they are using an old version of .NET? Here is the forum entry: gsfn.us/t/3s4ti
    – Watki02
    Mar 12, 2013 at 21:27

An answer propsed here: http://social.msdn.microsoft.com/Forums/en-US/vssetup/thread/2d11b6f9-3ada-4682-b643-c721a97af4ba

Sick of the problem? Dont know or care what winsock is or any of this low level crap means.

Go to a command prompt

do this

netsh Winsock reset

go on with your life and be happy.

  • Note, it did not solve my problem... but it did for several others.
    – Watki02
    Mar 12, 2013 at 21:07
  • Thank you Watki02, your answers (netsh Winsock reset) helps me to solve this problem for VB.Net clickOnce application develop in VS2010. Operation system Vista with .Net 4.5, to establish remote DB connection from Sql 2005 express edition to SQL 2005 Server.
    – user166271
    Mar 25, 2013 at 11:07
  • Thanks, it did help me, don't know what it means though :) Nov 26, 2013 at 12:32
  • Works like a charm, and so fast!!!
    – Jeff Tian
    Feb 15, 2015 at 9:53

In my particular setup, I was using storing session data in a custom database, I also had the data encrypted (Encrypt=True) via the connection string, removing this fixed the problem!

I suspect though that the data isn't being ssl encrypted as a result though, not much of an issue until we add more web servers though!


I did a system restore and I'm able to connect now.


None of these solutions worked for me. What did work was the following:


  • In SQL Server Configuration Manager

  • Select SQL Server Services

  • Locate the troubled service and view Properties

  • In the Log On tab, change the "Built-in account" to "Network Service"

Disclaimer: This was on my local dev PC so i had no security concerns doing so.


I had the same issue, only for my local instance, only for Azure Data Studio (No problem with SSMS). It was a certificate problem. Check, in SQL Server Configuration Manager:

  • SQL Server Network Configuration, right click on Protocols
  • In Flags tab, Force Encryption = NO
  • Restart SQL SERVER service

Open SQL Server Configuration Manager, and make sure the SQL Server service is running:

SQL Server Configuration Manager - Services

and configured to allow TCP/IP connections:

SQL Server Configuration Manager - Network Configuration

  • Thanks, tried that though already.
    – Rivka
    Aug 30, 2012 at 22:07

This error occurred after the installation of a program which changes the Internet Protocol settings of your computer. Recently I got the same issue after the installation of Internet download manager because IDM has changed the IP settings that error comes so after uninstalling IDM from my PC and restarting the PC solve the problem.

So uninstall any application which has changed the Internet Protocol settings like Internet download manager.


Sometimes this error comes due to overload of connections on SQL Server. So just change your DB to Single User and again change it to Multi user.

Or simply execute this query.


That solved my issue. :) Enjoy..!!


This problem can be related to a firewall in the middle that is doing SSL inspection.

I Suggest you either try again using another connection not doing SSL inspection, or ask your firewall admin to create an exemption for the source and/or destination you are connecting to,



I was getting this error message on each workstation attempting to connect to SQL. All computers are connected to a domain. What I did to resolve this issue was:

1) Create domian\user name as a login in SQL Management Studio of the user logging in to the workstation. 2) TLS 1.0 was also preventing this access. Transport Layer Security TLS is a cryptographic protocol used to establish a secure communications channel between two systems. It is used to authenticate one or both systems, and protect the confidentiality and integrity of information that passes between systems.

In the registry of both computers we went to \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Server. We swap the values in the two subkeys.
After a reboot I tested again and was able to successfully establish a connection.


You might have recently changed your user connections setting in the SQL server.
You have to bring up your instance in single-user mode by adding -m in startup parameter. Then you have to change the user connections settings by below commands:

USE AdventureWorks2012 ;  
EXEC sp_configure 'show advanced options', 1;  
EXEC sp_configure 'user connections', 325 ;  

We had the same issue. We checked everything including ping, telnet & RDP connectivity and at last realized that it started happening after our ISP has changed the route. After changing the route it started working.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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