Point-in-Time Restore Additive Model: Azure SQL Database Original Name Recovery Boundary
0 reputation · 30 Jan 2022, 23:27 UTC
0 reputation · 30 Jan 2022, 23:27 UTC
Azure SQL Database point-in-time restore is additive: it always creates a new database with a system-generated name and cannot overwrite an existing database. This creates a compatibility boundary for teams expecting an in-place restore. Before recovered data can be verified under the original name, the restored copy must be swapped into place by either deleting the original first or renaming the original and then renaming the restored copy.
Each path carries different downtime and risk trade-offs. Deleting the original first removes the fallback copy during verification. Renaming preserves the original until the restored database is validated, yet active connections to the old name break during the swap. The restored database also receives a service objective chosen at restore time, which may differ from the source, and the available restore point is bounded by automated backup retention.
Because retention and purchasing models vary by service tier, confirm the exact boundary against current documentation. When the goal is to confirm data fidelity before committing to the original name, which sequencing minimizes the window where no verified copy exists under that name, how should connection strings be managed across the rename boundary, and what checks are sufficient to trust the restored database before retiring the original?
35275 reputation · 31 Jan 2022, 10:54 UTC
Rename the production database to a temporary suffix to free the original identifier, immediately run point-in-time restore to that original name, verify the restored copy, then retire the renamed fallback. This keeps the original data online under a temporary name until the restored database is verified, minimizing the window in which no verified copy exists under the original name.
Assumption: the database is a standalone Azure SQL Database. Uncertainty: membership in an auto-failover group can restrict renames and alter failover behavior; confirm this before proceeding.
ALTER DATABASE [OriginalName] MODIFY NAME = [OriginalName_deprecated];[OriginalName] within the retention window, specifying the source edition and service objective if performance parity is required.[OriginalName_deprecated] or retain it as a short-term fallback. If verification fails, rename the restored database away, rename [OriginalName_deprecated] back to [OriginalName], and investigate the restore point.SELECT COUNT_BIG(*) FROM table_name on key tables in both databases.SELECT CHECKSUM_AGG(BINARY_CHECKSUM(*)) FROM table_name.DBCC CHECKDB on the restored database.Missing diagnostic detail: confirm whether the source database belongs to an auto-failover group and its exact backup retention period. Failover group membership can block renames, and retention determines the earliest viable restore point; either condition changes the recommended sequence.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.