Search code examples
azure-sql-databasessms

Unable to connect to Azure SQL Server with SSMS. Error: The specified network name is no longer available


I'm trying to connect to Azure SQL DB with SSMS, however I keep on getting the following error:

Cannot connect to xxxxxx.database.windows.net.

===================================

A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 0 - The specified network name is no longer available.) (Framework Microsoft SqlClient Data Provider)

------------------------------
For help, click: https://docs.microsoft.com/sql/relational-databases/errors-events/mssqlserver-64-database-engine-error

------------------------------
Server Name: xxxxxxx.database.windows.net
Error Number: 64
Severity: 20
State: 0

I see this is common error, but I'm not sure what the fix is.


Solution

  • A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 0 - The specified network name is no longer available.) (Framework Microsoft SqlClient Data Provider)

    The cause of error can be the network or firewall issue it might blocking the port 1433 which is used by Azure SQL to connect, switch to another network to connect if possible.

    • Ensure that your network connection is stable.
    • Check if your firewall or antivirus software is blocking the connection. Temporarily disable them and see if the issue persists.
    • Verify that the server name and port are correct in your connection string.
    • Check the SQL Server Configuration Manager to ensure that the appropriate protocols (TCP/IP) are enabled.