Ahmed Mujtaba
Ahmed Mujtaba

Reputation: 2248

Azure SQL database Connection issues

I'm trying to access the Azure database through SSMS but I get this error:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - The wait operation timed out.) (Microsoft SQL Server, Error: 258)

I have allowed my network IP on the database server and it doesn't say anything about a new IP trying to gain access. The connection is sometimes established but most of the time I get that error. I couldn't find anything related to this error specific to Azure DB. Is there a way to fix it?

Upvotes: 1

Views: 1999

Answers (1)

BrianAtkins
BrianAtkins

Reputation: 1359

Here are the recommended best practices for connecting to SQL Azure:

Client Drivers

  1. Recommended to get the latest version

Security and Firewall Rules

  1. Turn on encryption
  2. Turn off trust server certificate
  3. Open port #1433 and #1100-114999

Managing Connections

  1. 30s Connection timeout (SqlClient uses 15s as the default connection timeout)
  2. Explicitly specify tcp protocol (SQL DB supports only tcp
  3. Use connection pool

Upvotes: 1

Related Questions