Skip to content

Commit 90cba1d

Browse files
authored
Update restore-sql-pool-from-deleted-workspace.md
Correct the script to provide the correct code cmdlet that I used with the client which was Get-AzSynapseDroppedSqlPool. Added notes regarding that the Get-AzSynapseDroppedSqlPool needs to have the workspace available. If not, they can easily recreate the same workspace with the same values and the command will pick up the dropped database to be safely restored.
1 parent f5c7a57 commit 90cba1d

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

articles/synapse-analytics/backuprestore/restore-sql-pool-from-deleted-workspace.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,12 @@ In this article, you learn how to restore a dedicated SQL pool in Azure Synapse
5050
Connect-AzAccount
5151
Set-AzContext -SubscriptionID $SubscriptionID
5252
53-
# Get the exact date and time the workspace SQL pool was dropped. Please do not provide an approximate value. Use the below script to get the exact date time value.
54-
Get-AzSynapseSqlPoolRestorePoint -ResourceGroupName $ResourceGroupName -WorkspaceName $WorkspaceName -Name $SQLPoolName
55-
# Pick the desired restore point after verifying the date time output from the above command. Add it to the where predicate in the below script where x/xx/xxxx is seen.
56-
$DroppedDateTime = Get-AzSynapseSqlPoolRestorePoint -ResourceGroupName $ResourceGroupName -WorkspaceName $WorkspaceName -Name $SQLPoolName | Where-Object "RestorePointCreationDate" -eq "x/xx/xxxx x:xx:xx xM" | Select-Object -ExpandProperty RestorePointCreationDate
53+
# Get the exact date and time the workspace SQL pool was dropped.
54+
# Please note that this assumes that the workspace with the same name resource group and same values is still available.
55+
# If not, please recreate the dropped workspace to get the output from the below. You will have to use the same workspace name, resource group name, region and all the same values from prior dropped workspace.
56+
# There should only be one selection to select from.
57+
$DroppedDateTime = Get-AzSynapseDroppedSqlPool -ResourceGroupName $ResourceGroupName -WorkspaceName $WorkspaceName -Name $DatabaseName | Select-Object -ExpandProperty DeletionDate
58+
5759
5860
# construct the resource ID of the sql pool you wish to recover. The format required Microsoft.Sql. This includes the approximate date time the server was dropped.
5961
$SourceDatabaseID = "/subscriptions/"+$SubscriptionID+"/resourceGroups/"+$ResourceGroupName+"/providers/Microsoft.Sql/servers/"+$WorkspaceName+"/databases/"+$DatabaseName

0 commit comments

Comments
 (0)