exam questions

Exam DP-300 All Questions

View all questions & answers for the DP-300 exam

Exam DP-300 topic 6 question 25 discussion

Actual exam question from Microsoft's DP-300
Question #: 25
Topic #: 6
[All DP-300 Questions]

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: You run the Remove-AzSqlDatabase PowerShell cmdlet for Database1 on Server2. You run the Restore-AzSqlDatabase PowerShell cmdlet for
Database1 on Server2.
Does this meet the goal?

  • A. Yes
  • B. No
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Meir
Highly Voted 4 years, 8 months ago
The answer is yes. See https://docs.microsoft.com/en-us/powershell/module/az.sql/restore-azsqldatabase?view=azps-4.5.0 that doesn't have replsce option. The suggested solution is not for Azure DB
upvoted 20 times
...
[Removed]
Highly Voted 4 years, 8 months ago
"You run the Restore-AzSqlDatabase PowerShell cmdlet for Database1 on Server2." Based on the above statement, the above command will end up restoring backup of the deleted database again. So the answer is (B) No. ???
upvoted 5 times
bobicos
4 years, 6 months ago
I agree. Although it is possible to restore a geo-replicated backup w/ Restore-AzSqlDatabase, but the instructions would be missing a step to do so. https://docs.microsoft.com/en-us/powershell/module/az.sql/restore-azsqldatabase?view=azps-4.8.0#example-5--geo-restore-a-database
upvoted 2 times
U_C
4 years, 1 month ago
Needs two steps to restore: --Gets the geo-redundant backup for the database named Database01, and then stores it in the $GeoBackup variable. $GeoBackup = Get-AzSqlDatabaseGeoBackup -ResourceGroupName "ResourceGroup01" -ServerName "Server01" -DatabaseName "Database01" --Restores the backup in $GeoBackup to the SQL database named RestoredDatabase. Restore-AzSqlDatabase -FromGeoBackup -ResourceGroupName "TargetResourceGroup" -ServerName "TargetServer" -TargetDatabaseName "RestoredDatabase" -ResourceId $GeoBackup.ResourceID -Edition "Standard" -ServiceObjectiveName "S2"
upvoted 2 times
...
...
Luke97
4 years, 5 months ago
Restore-AzSqlDatabase can also restore Azure DB from point-of-time.
upvoted 1 times
...
...
bingomutant
Most Recent 6 months, 4 weeks ago
NO - steps are missing here, and the cmdlet alone would not satisfy the requirements unless several assumptions are made. Poor question.
upvoted 1 times
...
scottytohotty
9 months, 4 weeks ago
Selected Answer: B
No this does not meet the requirements, tricky worded question.
upvoted 1 times
...
cusman
3 years, 1 month ago
Selected Answer: B
No - Since it does not specify that you are restoring Database1 from Server1 to Server2 after Database1 on Server2 was removed.
upvoted 2 times
...
examtry
3 years, 11 months ago
Answer is Yes. This can be done from Geo backups.
upvoted 2 times
...
hydrillo
4 years, 1 month ago
What's the right answer here guys? I tried both with the Azure Portal and with Powershell and both works as suggested in the answers. Maybe this questions is outdated
upvoted 1 times
hydrillo
4 years, 1 month ago
Update: Theoretically it would work with powershell, but I think the clue here is that it says "restore Database 1 on Server 2" which would just restore the previously deleted Database. In the answer with the Azure Portals the correct terms are used. That's why that is right and this is wrong.
upvoted 3 times
...
...
Jas_dandiwal
4 years, 2 months ago
Answer is No. it does not let you delete database to restore on another server as throw ResourceId wrong message for database.
upvoted 2 times
...
Corbiz
4 years, 2 months ago
No. Azure SQL Database does not currently support cross server restore. The source and target server names must be the same. https://docs.microsoft.com/en-us/powershell/module/servicemanagement/azure.service/start-azuresqldatabaserestore?view=azuresmps-4.0.0
upvoted 4 times
Corbiz
4 years, 2 months ago
Sorry, answer is actually Yes. You can do it using the "-FromGeoBackup" parameter. Tested myself.
upvoted 5 times
ed7
4 years, 2 months ago
but there is no info that GeoBackup exists anywhere
upvoted 1 times
Raffer
4 years, 1 month ago
"By default, SQL Database and SQL Managed Instance store data in geo-redundant storage blobs that are replicated to a paired region." https://docs.microsoft.com/en-us/azure/azure-sql/database/automated-backups-overview?tabs=single-database
upvoted 2 times
...
nazant
4 years, 1 month ago
Exactly. So we may suppose that ony PITR backups exist on server1 and I haven't found information if it is possible to restore PITR on other server with Restore-AzSqlDatabase command.
upvoted 1 times
...
...
...
...
Geese_Howard
4 years, 2 months ago
The answer is A. You can restore database with the given command. To restore a deleted backup you need to run Get-AzSqlDeletedDatabaseBackup before restore. And also to restore from geo redundant copy one have to use -FromGeoBackup as a parameter as well.
upvoted 3 times
Geese_Howard
4 years, 2 months ago
MS link here https://docs.microsoft.com/en-us/azure/azure-sql/database/scripts/restore-database-powershell
upvoted 1 times
...
...
QiangQiang
4 years, 3 months ago
without seeing the actual PS commands, it's hard to say if it's yes or no
upvoted 1 times
QiangQiang
4 years, 3 months ago
it should be Yes
upvoted 2 times
...
...
V_karag
4 years, 3 months ago
A deleted database can only be recovered on the same server. https://docs.microsoft.com/en-us/azure/azure-sql/database/recovery-using-backups#:~:text=To%20recover%20a%20deleted%20database,data%20restored%20from%20the%20backup. In order to restore on different virtual server you need to create on first and then restore from latest backup
upvoted 1 times
...
JohnCrawford
4 years, 4 months ago
The correct answer is YES. The Restore-AzSqlDatabase cmdlet restores a SQL database from a geo-redundant backup, a backup of a deleted database, a long term retention backup, or a point in time in a live database. The restored database is created as a new database. You can create an elastic SQL database by setting the ElasticPoolName parameter to an existing elastic pool.
upvoted 4 times
...
BurhanUddin
4 years, 4 months ago
What is the answer her?
upvoted 2 times
...
rob51i03
4 years, 6 months ago
The answer is correct, but not the explanation. In Azure SQL you can't restore a database over an existing one, so WITH REPLACE does not exist. However, the business requirements are not met because there is a step missing, which would be to make the backup from Server 1 available to Server 2 for restoring.
upvoted 3 times
Luke97
4 years, 5 months ago
You can't create Backup manually on Azure SQL DB. So, no missing step here.
upvoted 1 times
...
...
MediMedi
4 years, 6 months ago
Remove and restore is not the target here.
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago