November 2017
Intermediate to advanced
276 pages
7h 6m
English
Using the same method that we used to restore a point-in-time database, a deleted database is restored with only a few minor changes, as shown in the following cmdlets:
$DeletedDatabase = Get-AzureRmSqlDeletedDatabaseBackup -ResourceGroupName PacktPub -ServerName packtpubsqlps -DatabaseName PacktPubDBPS$Date = Get-Date – Date “The date you want to restore to”$Date = $Date.ToUniversalTime()Restore-AzureRmSqlDatabase -FromDeletedDatabaseBackup -DeletionDate $DeletedDatabase.DeletionDate -ResourceGroupName $DeletedDatabase.ResourceGroupName -ServerName packtpubsqlps -TargetDatabaseName "RestoredDatabase-Deleted" -ResourceId $DeletedDatabase.ResourceID -ServiceObjectiveName "S3" -PointInTime $Date ...