Skip to content

Commit 9bc0eb9

Browse files
20240729 improve script steps and instructions in comments
1 parent f6c70b8 commit 9bc0eb9

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

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

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
---
22
title: Restore a dedicated SQL pool from a dropped workspace
33
description: How-to guide for restoring a dedicated SQL pool from a dropped workspace.
4-
author: realAngryAnalytics
5-
ms.author: stevehow
6-
ms.reviewer: wiassaf
7-
ms.date: 01/23/2024
4+
author: WilliamDAssafMSFT
5+
ms.author: wiassaf
6+
ms.reviewer: stevehow, ajagadish
7+
ms.date: 07/29/2024
88
ms.service: synapse-analytics
99
ms.subservice: sql
1010
ms.topic: how-to
1111
---
12-
1312
# Restore a dedicated SQL pool from a deleted workspace
1413

1514
In this article, you learn how to restore a dedicated SQL pool in Azure Synapse Analytics after an accidental drop of a workspace using PowerShell.
@@ -23,21 +22,24 @@ In this article, you learn how to restore a dedicated SQL pool in Azure Synapse
2322

2423
## Restore the SQL pool from the dropped workspace
2524

25+
The following sample script accomplishes these steps:
26+
2627
1. Open PowerShell
2728

2829
1. Connect to your Azure account.
2930

3031
1. Set the context to the subscription that contains the workspace that was dropped.
3132

32-
1. Specify the approximate datetime the workspace was dropped.
33-
34-
1. Construct the resource ID for the database you wish to recover from the dropped workspace.
33+
1. Determine the datetime the workspace was dropped. This step retrieves the exact date and time the workspace SQL pool was dropped.
34+
- This step assumes that the workspace with the same name resource group and same values is still available.
35+
- If not, recreate the dropped workspace with the same workspace name, resource group name, region, and all the same values from prior dropped workspace.
36+
37+
1. Construct the resource ID of the sql pool you wish to recover. The format requires `Microsoft.Sql`. This includes the date and time when the server was dropped.
3538

36-
1. Restore the database from the dropped workspace
39+
1. Restore the database from the dropped workspace. Restore to the target workspace with the source SQL pool.
3740

3841
1. Verify the status of the recovered database as 'online'.
3942

40-
4143
```powershell
4244
$SubscriptionID="<YourSubscriptionID>"
4345
$ResourceGroupName="<YourResourceGroupName>"
@@ -51,13 +53,12 @@ In this article, you learn how to restore a dedicated SQL pool in Azure Synapse
5153
Set-AzContext -SubscriptionID $SubscriptionID
5254
5355
# 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+
# This assumes that the workspace with the same name resource group and same values is still available.
57+
# If not, recreate the dropped workspace with the same workspace name, resource group name, region, and all the same values from prior dropped workspace.
5658
# There should only be one selection to select from.
5759
$DroppedDateTime = Get-AzSynapseDroppedSqlPool -ResourceGroupName $ResourceGroupName -WorkspaceName $WorkspaceName -Name $DatabaseName | Select-Object -ExpandProperty DeletionDate
58-
5960
60-
# 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.
61+
# Construct the resource ID of the sql pool you wish to recover. The format requires Microsoft.Sql. This includes the approximate date time the server was dropped.
6162
$SourceDatabaseID = "/subscriptions/"+$SubscriptionID+"/resourceGroups/"+$ResourceGroupName+"/providers/Microsoft.Sql/servers/"+$WorkspaceName+"/databases/"+$DatabaseName
6263
6364
# Restore to the target workspace with the source SQL pool.
@@ -68,6 +69,7 @@ In this article, you learn how to restore a dedicated SQL pool in Azure Synapse
6869
```
6970
7071
## <a id="troubleshooting"></a> Troubleshoot
72+
7173
If "An unexpected error occurred while processing the request." message is received, the original database might not have any recovery points available due to the original workspace being short lived. Typically this is when the workspace existed for less than one hour.
7274
7375
## Related content

0 commit comments

Comments
 (0)