How do I fix a connection access issue to my database server on azure?

Beth J 0 Reputation points
2026-07-19T21:19:28.1233333+00:00

|System.Data.SqlClient.SqlException: Database 'GetSketchy_QA' on server 'getsketchy-serverqa.database.windows.net' is not currently available. Please retry the connection later. If the problem persists, contact customer support, and provide them the session tracing ID of  [Removed PII]'.| | -------- | How do I fix this connection issue without a virtual network?

It is not a transient error. It is a brand new site that I have not been able to connect the api and the db. I've triple checked the connection string.

It is also not an issue with connecting to the database via other means. I can connect to the db using SSMS just fine.

I've tried looking into how to create an azure service ticket, but it just keeps sending me here to the Q&A.

Azure SQL Database

1 answer

Sort by: Most helpful
  1. Ganesh Chelluri 190 Reputation points Microsoft External Staff Moderator
    2026-07-19T23:08:24.33+00:00

    Hi @Beth J

    That error (40613 "Database not currently available") is a transient service-side event on Azure SQL Database, not a firewall or VNet issue. The DB briefly moved (patching, reconfiguration, node move, or brief service degradation) and rejected in-flight connections. Since your question was "how to fix without a virtual network" you don't need one, this isn't a network access problem.

    Fix :

    Retry the connection. Most 40613s clear in under 60 seconds. If it works on retry, no further action needed.

    Check current status:

    Portal → your SQL server → your database → Resource health (look for "Available/Degraded/Unavailable" around the timestamp of the session tracing ID).

    Portal → Service Health → Health advisories, for any Azure SQL DB regional event.

    If it persists (still failing after several minutes):

    Confirm the DB isn't paused (Serverless tier auto-pauses; first connection resumes it, which itself throws 40613 briefly).

    Confirm the DB isn't mid-scale, mid-restore, or in Copying/Scaling state (Overview blade shows state).

    If Overview shows the DB is Online but you still get 40613, open an Azure support case with the session tracing ID 31F4D1D6-CE8E-4119-9D5C-E831DD883A59 backend can trace the exact node event.

    Make it not surface to users next time add retry logic (Microsoft's official guidance for 40613):

    Microsoft.Data.SqlClient (newer replacement for System.Data.SqlClient) has built-in connection resiliency switch to it if you can.

    Or wrap DB calls with retry on transient error codes: 40613, 40501, 40197, 10928, 10929, 49918, 4060. Exponential backoff, 5 retries, initial 2–5s.

    Connection Timeout=30 and Encrypt=True in the connection string; keep ConnectRetryCount=3;ConnectRetryInterval=10 (default for Microsoft.Data.SqlClient).

    Direct answer to your question: no VNet, no firewall change, no server-side config change is needed. This is a transient event retry unblocks it now, retry logic prevents it from reaching users going forward. If Resource health shows the DB is unavailable right now, that's the case for a support ticket with the tracing ID above.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.