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.md
+93-3Lines changed: 93 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,9 +6,9 @@ manager: joannapea
6
6
ms.service: synapse-analytics
7
7
ms.topic: how-to
8
8
ms.subservice: sql
9
-
ms.date: 10/07/2022
9
+
ms.date: 12/07/2022
10
10
ms.author: stevehow
11
-
ms.reviewer: joanpo
11
+
ms.reviewer: joanpo, wiassaf
12
12
ms.custom: seo-lt-2019, engagement-fy23
13
13
---
14
14
@@ -36,7 +36,7 @@ In this article, you learn how to restore an existing dedicated SQL pool in Azur
36
36
37
37
* If the dedicated SQL pool doesn't have any automatic restore points, wait a few hours, or create a user defined restore point before restoring. For User-Defined Restore Points, select an existing one or create a new one.
38
38
39
-
* If you want to restore a dedicated SQL pool from a different workspace, select **New dedicated SQL pool** from your current workspace. Under the **Additional settings** tab find the **Use existing data** and select the **Restore point** option. As shown in the above screenshot, you can then select the **Server or workspace** name from which you can restore.
39
+
* If you want to restore a dedicated SQL pool from a different workspace, select **New dedicated SQL pool** from your current workspace. Under the **Additional settings** tab, find the **Use existing data** and select the **Restore point** option. As shown in the above screenshot, you can then select the **Server or workspace** name from which you can restore.
40
40
41
41
* If you are restoring a geo-backup, select the workspace located in the source region and the dedicated SQL pool you want to restore.
42
42
@@ -206,6 +206,95 @@ $RestoredDatabase.status
206
206
207
207
```
208
208
209
+
## Restore an existing dedicated SQL pool to a different tenant through PowerShell
210
+
211
+
When performing a cross-tenant-subscription restore, a dedicated SQL pool in an Azure Synapse workspace can only restore directly to a standalone dedicated SQL pool (formerly SQL DW). If it is required to restore a dedicated SQL pool in an Azure Synapse workspace to a workspace in the destination subscription across a different tenant, an additional restore step is required.
212
+
213
+
For cross-tenant-subscription restore, the user must have a '(Guest)' account with either the 'Owner' or 'Contributor' access permissions to the destination tenant to which the dedicated SQL pool (formerly SQL DW) will be restored to.
214
+
215
+
The following PowerShell script for cross-tenant restore works in the same way as a cross-subscription restore when the user is given '(Guest)' access to the destination tenant.
216
+
217
+
Steps:
218
+
219
+
1. Open a PowerShell terminal.
220
+
1. Update Az.Sql Module to 3.8.0 (or greater) using `Update-Module`.
221
+
1. Connect to your Azure account using `Connect-AzAccount`.
222
+
1. List all the subscriptions associated with your account along with its Tenant ID. Select the subscription that contains the dedicated SQL pool to be restored.
223
+
1. List the restore points for the dedicated SQL pool using `Get-AzSynapseSqlPoolRestorePoint`.
224
+
1. Pick the desired restore point, setting the variable `$PointInTime`.
225
+
1. In the destination tenant, make sure your user has guest access with either 'Owner' or 'Contributor' permissions.
226
+
1. Select the destination subscription along with the corresponding Tenant ID to which the dedicated SQL pool should be restored.
227
+
1. Restore the dedicated SQL pool to the desired restore point using `Restore-AzSqlDatabase`.
228
+
1. Verify that the restored dedicated SQL pool (formerly SQL DW) is online.
229
+
1. If the desired destination is a Synapse workspace, uncomment the code to perform the additional restore step.
230
+
1. Create a restore point for the newly created data warehouse.
231
+
1. Retrieve the last restore point created by using the `Select -Last 1` syntax.
232
+
1. Perform the restore to the desired Azure Synapse workspace.
233
+
234
+
235
+
```powershell
236
+
$SourceTenantID="<YourSourceTenantID>" # like '00000000-0000-0000-0000-000000000000'
-[What's the difference between Azure Synapse (formerly SQL DW) and Azure Synapse Analytics Workspace](https://techcommunity.microsoft.com/t5/azure-synapse-analytics-blog/what-s-the-difference-between-azure-synapse-formerly-sql-dw-and/ba-p/3597772)
**Verify your DTU capacity.** Each pool is hosted by a [logical SQL server](/azure/azure-sql/database/logical-servers) (for example, myserver.database.windows.net) which has a default DTU quota. Verify the server has enough remaining DTU quota for the database being restored. To learn how to calculate DTU needed or to request more DTU, see [Request a DTU quota change](sql-data-warehouse-get-started-create-support-ticket.md).
21
+
**Verify your DTU capacity.** Each pool is hosted by a [logical SQL server](/azure/azure-sql/database/logical-servers) (for example, `myserver.database.windows.net`) which has a default DTU quota. Verify the server has enough remaining DTU quota for the database being restored. To learn how to calculate DTU needed or to request more DTU, see [Request a DTU quota change](sql-data-warehouse-get-started-create-support-ticket.md).
22
22
23
23
## Before you begin
24
24
@@ -85,12 +85,12 @@ $RestoredDatabase.status
85
85
## Restore an existing dedicated SQL pool (formerly SQL DW) through the Azure portal
86
86
87
87
1. Sign in to the [Azure portal](https://portal.azure.com/).
88
-
2. Navigate to the dedicated that you want to restore from.
89
-
3. At the top of the Overview blade, select **Restore**.
88
+
2. Navigate to the dedicated SQL pool that you want to restore from.
89
+
3. At the top of the **Overview** page, select **Restore**.
4. Select either **Automatic Restore Points** or **User-Defined Restore Points**. If the dedicated SQL pool (formerly SQL DW) doesn't have any automatic restore points, wait a few hours or create a user defined restore point before restoring. For User-Defined Restore Points, select an existing one or create a new one. For **Server**, you can pick a server in a different resource group and region or create a new one. After providing all the parameters, click**Review + Restore**.
93
+
4. Select either **Automatic Restore Points** or **User-Defined Restore Points**. If the dedicated SQL pool (formerly SQL DW) doesn't have any automatic restore points, wait a few hours or create a user defined restore point before restoring. For User-Defined Restore Points, select an existing one or create a new one. For **Server**, you can pick a server in a different resource group and region or create a new one. After providing all the parameters, select**Review + Restore**.
## Restore an existing dedicated SQL pool (formerly SQL DW) to a different tenant through PowerShell
154
+
155
+
This is similar guidance to cross subscription restore. However the below instructions show that [Get-AzSqlDatabase](/powershell/module/az.sql/Get-AzSqlDatabase?toc=/azure/synapse-analytics/sql-data-warehouse/toc.json&bc=/azure/synapse-analytics/sql-data-warehouse/breadcrumb/toc.json) PowerShell cmdlet should be performed in the originating tenant while the [Restore-AzSqlDatabase](/powershell/module/az.sql/restore-azsqldatabase?toc=/azure/synapse-analytics/sql-data-warehouse/toc.json&bc=/azure/synapse-analytics/sql-data-warehouse/breadcrumb/toc.json) PowerShell cmdlet should be performed in the destination tenant.
156
+
157
+
Note that the user performing the restore must have proper permissions in both the source and target tenants. At the destination tenant, the user must have a '(Guest)' account with either the 'Owner' or 'Contributor' access permissions to which the dedicated SQL pool (formerly SQL DW) will be restored to.
158
+
159
+
The following PowerShell script for cross-tenant restore works in the same way as a cross-subscription restore when the user is given '(Guest)' access to the destination tenant.
160
+
161
+
> [!NOTE]
162
+
> If you intend to restore your dedicated SQL pool (formerly SQL DW) to a Synapse workspace, use the additional PowerShell steps provided in [Restore an existing dedicated SQL pool](../backuprestore/restore-sql-pool.md). For more information on the differences between dedicated SQL pools, see [What's the difference between Azure Synapse (formerly SQL DW) and Azure Synapse Analytics Workspace](https://techcommunity.microsoft.com/t5/azure-synapse-analytics-blog/what-s-the-difference-between-azure-synapse-formerly-sql-dw-and/ba-p/3597772).
163
+
164
+
1. Open a PowerShell terminal.
165
+
1. Update Az.Sql Module to 3.8.0 (or greater) using `Update-Module`.
166
+
1. Connect to your Azure account using `Connect-AzAccount`.
167
+
1. List all the subscriptions associated with your account along with its Tenant ID. Select the subscription that contains the source dedicated SQL pool to be restored.
168
+
1. List the restore points for the dedicated SQL pool using `Get-AzSqlDatabaseRestorePoint`.
169
+
1. Pick the desired restore point, setting the variable `$PointInTime`.
170
+
1. In the destination tenant, make sure your user has guest access with either 'Owner' or 'Contributor' permissions.
171
+
1. Select the destination subscription along with the corresponding Tenant ID to which the dedicated SQL pool should be restored.
172
+
1. Restore the dedicated SQL pool to the desired restore point using `Restore-AzSqlDatabase`.
173
+
1. Verify that the restored dedicated SQL pool (formerly SQL DW) is online in the new tenant.
174
+
175
+
```powershell
176
+
$SourceSubscriptionName="<YourSubscriptionName>"
177
+
$SourceTenantID="<YourTenantID>" # like '00000000-0000-0000-0000-000000000000'
0 commit comments