2
votes

I am attempting to test some disaster recovery procedures in Azure.

I have taken a copy of a production Azure SQL database on a test server, deleted it, and am attempting to restore it using the "Deleted databases" option under the SQL Server. When restoring the deleted database backup, it fails after ~34 minutes with:

Status: Failed

Code: InternalServerError

Message: An unexpected error occured while processing the request. Tracking ID: 'xxxxxxxxxx'

Screenshot:

enter image description here

I have tried twice now without success. This is concerning since I am not sure this same issue would occur when trying to restore the production database in the same scenario.

What could be causing this problem? I did the same test using the Sample AdventureWorksLT source and it worked just fine, so it seems to be something with my application's production database specifically.

1
Have you tested exporting to bacpac that Production database and then import the bacpac from storage account? I would love to see if the import fails the same as the restore. If the import fails you may get a more detailed error.Alberto Morillo
@AlbertoMorillo I have not tried this route yet since it's not really the recovery case I am trying to test. Maybe I can try that though if it would give more information.kspearrin
That's my interest to test that route.Alberto Morillo
Same issue here. Any one?Piotr Śródka

1 Answers

0
votes

Try using PowerShell instead of the portal. Also, the "Conflict" status suggests you are restoring an object with the same name as the running DB, try giving adding _restored to the name of the restored DB.

PS C:\>$DeletedDatabase = Get-AzSqlDeletedDatabaseBackup -ResourceGroupName "ResourceGroup01" -ServerName "Server01" -DatabaseName "Database01"
PS C:\> Restore-AzSqlDatabase -FromDeletedDatabaseBackup -DeletionDate $DeletedDatabase.DeletionDate -ResourceGroupName $DeletedDatabase.ResourceGroupName -ServerName $DeletedDatabase.ServerName -TargetDatabaseName "RestoredDatabase" -ResourceId $DeletedDatabase.ResourceID -Edition "Standard" -ServiceObjectiveName "S2" -PointInTime UTCDateTime

The first command gets the deleted database backup that you want to restore by using Get-AzSqlDeletedDatabaseBackup. The second command starts the restore from the deleted database backup by using the Restore-AzSqlDatabase cmdlet. If the -PointInTime parameter is not specified, the database will be restored to the deletion time.