You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/synapse-analytics/backuprestore/restore-sql-pool-from-deleted-workspace.md
+46-25Lines changed: 46 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,14 @@
1
1
---
2
2
title: Restore a dedicated SQL pool from a dropped workspace
3
3
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
8
8
ms.service: synapse-analytics
9
9
ms.subservice: sql
10
10
ms.topic: how-to
11
11
---
12
-
13
12
# Restore a dedicated SQL pool from a deleted workspace
14
13
15
14
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,49 +22,71 @@ In this article, you learn how to restore a dedicated SQL pool in Azure Synapse
23
22
24
23
## Restore the SQL pool from the dropped workspace
25
24
25
+
The following sample script accomplishes these steps:
26
+
26
27
1. Open PowerShell
27
28
28
29
1. Connect to your Azure account.
29
30
30
31
1. Set the context to the subscription that contains the workspace that was dropped.
31
32
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 a string 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.
35
38
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.
37
40
38
41
1. Verify the status of the recovered database as 'online'.
39
42
40
-
41
43
```powershell
42
-
$SubscriptionID="<YourSubscriptionID>"
43
-
$ResourceGroupName="<YourResourceGroupName>"
44
-
$WorkspaceName="<YourWorkspaceNameWithoutURLSuffixSeeNote>" # Without sql.azuresynapse.net
# 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
-
58
-
# 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.
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.
0 commit comments