Skip to content

Commit 067cbd4

Browse files
authored
Update restore-sql-pool-from-deleted-workspace.md
I updated the below as the desired date time selection should not be an approximate timeframe it needs to be explicit, or it will fail. # Define the approximate point in time the workspace was dropped as DroppedDateTime "yyyy-MM-ddThh:mm:ssZ" (ex. 2022-01-01T16:15:00Z) $PointInTime="<DroppedDateTime>" $DroppedDateTime = Get-Date -Date $PointInTime
1 parent 50f188f commit 067cbd4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ 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-
# Define the approximate point in time the workspace was dropped as DroppedDateTime "yyyy-MM-ddThh:mm:ssZ" (ex. 2022-01-01T16:15:00Z)
54-
$PointInTime="<DroppedDateTime>"
55-
$DroppedDateTime = Get-Date -Date $PointInTime
56-
57-
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+
$PointInTime = Get-AzSynapseSqlPoolRestorePoint -ResourceGroupName $ResourceGroupName -WorkspaceName $WorkspaceName -Name $SQLPoolName | Where-Object "RestorePointCreationDate" -eq "x/xx/xxxx x:xx:xx xM" | Select-Object -ExpandProperty RestorePointCreationDate
57+
5858
# 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.
5959
$SourceDatabaseID = "/subscriptions/"+$SubscriptionID+"/resourceGroups/"+$ResourceGroupName+"/providers/Microsoft.Sql/servers/"+$WorkspaceName+"/databases/"+$DatabaseName
6060

0 commit comments

Comments
 (0)