Azure SQL server name not released after deletion - ServerDnsAliasDnsRecordInUse when creating a server DNS alias

David Alguacil Aragón 20 Reputation points
2026-11-19T15:11:49.7266667+00:00

I migrated an Azure SQL logical server to a new region and deleted the old one (name klevio, westus2) about 1.5 hours ago. I want to create a server DNS alias called klevio on the new server (swedencentral) so existing clients keep working.

Creating it fails with: ServerDnsAliasDnsRecordInUse: The endpoint 'klevio' is already in use.

Also, checkNameAvailability for type Microsoft.Sql/servers returns available: false, reason: AlreadyExists, and klevio.database.windows.net still resolves via CNAME to dataslice4.westus2.database.windows.net, which no longer exists.

In a test with empty servers, the alias was created 6 seconds after deleting the server. Here it has been blocked for over an hour.

Questions: How long does Azure keep the name/DNS record reserved after a server deletion? Is there a way to force its release without a paid support plan? I do NOT want to recover the deleted server.

Azure SQL Database
0 comments No comments

Answer accepted by question author

AI answer

2026-11-19T15:13:40.9733333+00:00

There is no documented self-service command to force-release an Azure SQL logical-server hostname without restoring the deleted server; first determine whether klevio is soft-deleted, then wait for its retention period—or, if it is not retained, for the asynchronous backend cleanup.

1. Check whether the server is soft-deleted

Azure SQL logical-server soft delete is currently in preview. When enabled, retention is 1–7 days; logical servers older than two years automatically receive seven-day retention, while newer servers have it disabled by default. A retained server is not permanently removed until that period expires.^1^

Using Azure CLI 2.84.0 or later:

az sql server deleted-server show \
  --name klevio \
  --location westus2

# Alternatively, list all retained servers in the old region:
az sql server deleted-server list \
  --location westus2 \
  --output table

Interpret the result as follows:

  • klevio is returned: it remains in its configured soft-delete window. Since recovery is not wanted, leave it deleted and wait for retention to expire.
  • It is not returned: the server was permanently deleted, but its hostname/DNS cleanup has not completed. Microsoft publishes no guaranteed release interval for this post-deletion state, so retry name availability and alias creation with backoff.

The test completing in six seconds does not establish a normal release time because the test servers might not have had soft-delete retention enabled.

2. Do not treat the two-minute alias delay as the server-name release time

Azure SQL DNS alias names are globally unique across servers, just like logical-server names. Dropping a server also drops aliases that refer to it.^2^

The documented up-to-two-minute delay applies when an existing DNS alias is updated or removed. It does not specify how quickly the hostname of a deleted logical server becomes reusable. Therefore, the remaining CNAME and checkNameAvailability: AlreadyExists indicate that Azure still considers klevio reserved; repeatedly deleting an alias from the new server will not release it.

3. Available remediation paths

Because you do not want to restore the deleted server:

  1. If it appears in deleted-server show, wait until its retention expires.
  2. If it does not appear, retry periodically rather than relying only on DNS resolution. DNS results can remain cached, while checkNameAvailability directly reflects whether Azure permits reuse.
  3. In Azure portal → Help + support → Create a support request, select Azure SQL Database and the server creation/deletion or provisioning category. Include:
    • deletion timestamp;
    • old region (westus2);
    • new region (swedencentral);
    • ServerDnsAliasDnsRecordInUse;
    • the checkNameAvailability response;
    • current CNAME result;
    • confirmation that the server is absent from the deleted-server list.

Manual investigation or release is a technical-support operation. Standard Azure technical support requires a support plan; free subscription-management support covers billing, quota adjustments, and account transfers, not this provisioning problem.^3^ If your subscription has no technical plan, use an existing organization-wide, Enterprise Agreement, CSP, or partner support entitlement if available. There is no documented free purge/release endpoint for this Azure SQL condition.

Azure does document an early-purge procedure—restore the server, set retention to 0, and delete it again—but that necessarily recovers the server temporarily, so it conflicts with your stated requirement and is not the recommended path here.^1^


References

  1. Restore a deleted logical server in Azure SQL Database (preview)
  2. DNS alias - Azure SQL Database | Microsoft Learn
  3. Create an Azure support request
AI-generated content may be incorrect. Read our transparency notes for more information.

Was this answer helpful?

1 person found this answer helpful.

0 additional answers

Sort by: Oldest

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.