DP-300 practice question 18 of 35

You have two Azure SQL Database servers named Server1 and Server2. Each server contains an Azure SQL database named Database1. You need to restore…

Full set: 407 questions

Domain Plan and configure a high availability and disaster recovery solution

Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution. After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen. You have two Azure SQL Database servers named Server1 and Server2. Each server contains an Azure SQL database named Database1. You need to restore Database1 from Server1 to Server2. The solution must replace the existing Database1 on Server2. Solution: From Microsoft SQL Server Management Studio (SSMS), you rename Database1 on Server2 as Database2. From the Azure portal, you create a new database on Server2 by restoring the backup of Database1 from Server1, and then you delete Database2. Does this meet the goal?
Answer options
A: Yes Correct answer
B: No
Correct Answer:
A. Yes
Explanation

The proposed solution correctly meets the goal. Azure SQL Database does not support restoring a database directly over an existing database with the same name. The standard and documented procedure is to first rename or delete the target database. The solution follows this exact pattern: it renames the existing Database1 on Server2, which frees up the name. Then, it restores the backup from Server1 to a new database on Server2, giving it the original name Database1. Finally, it cleans up by deleting the renamed (old) database. This multi-step process effectively replaces the database as required.

Why Incorrect

B: This option is incorrect. The solution provides a valid, step-by-step, and officially recommended method to replace an Azure SQL Database with a restored copy when a direct overwrite is not possible.

References

1. Microsoft Learn, Restore a database from a backup in Azure SQL Database. Under the section "How to perform a restore," the documentation explicitly states: "You can't restore over an existing database. You must first delete or rename the existing database." This directly validates the procedure described in the solution.

2. Microsoft Learn, Automated backups in Azure SQL Database. In the "Point-in-time restore" section, it is noted that "A point-in-time restore always creates a new database." This confirms that an overwrite is not an option and a new database must be created, which aligns with the proposed solution's approach.

3. Microsoft Learn, RESTORE DATABASE (Azure SQL Database). The Transact-SQL reference for the RESTORE DATABASE command in Azure SQL Database shows that it creates a new database and does not include a WITH REPLACE option, which is available in on-premises SQL Server. This technical limitation necessitates the rename/delete-and-restore approach.

Scroll to Top