2

Occasionally, when I go to connect to my Azure SQL Server through either Power BI or SSMS, I get the following error:

A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 0 - The semaphore timeout period has expired.) (Microsoft SQL Server, Error: 121)

There are numerous questions about this topic, but very few address this for Azure SQL Server. My IP address is added to the firewall (and works sometimes!) I have tried increasing the connection time out. I have tried to look at the "netsh WinSock Show Catalog" information as directed by the answer to this question, but nothing looked incorrectly formatted.

Has anyone seen any other reason for this error? It popped up a few days ago, went away for a few days, and is back now, but I haven't changed anything in the meantime.

Saralyn
  • 303
  • 2
  • 4
  • 9

2 Answers2

2

The problem ended up being that my computer had disconnected from my company's VPN.

Saralyn
  • 303
  • 2
  • 4
  • 9
1

Error 121 has always been considered a network related error as you can read in this Microsoft Support article. The Internet service you receive, network adapters are things you should consider examine.

Network connectivity problems have various causes, but they typically occur because of incorrect network adapters, incorrect switch settings, faulty hardware, or driver issues. Some connectivity symptoms are intermittent and do not clearly point to any one of these causes.

Typical error messages include the following:

Error 121: "The semaphore timeout period has expired" (ERROR_SEM_TIMEOUT).

Please consider to click the "Options" button of SQL Server Management Studio, on the "Connection Properties" tab, try setting a greater value for the "Connection time-out" setting.

Alberto Morillo
  • 13,893
  • 2
  • 24
  • 30