Skip to content

Commit 7c9440e

Browse files
Merge pull request #221192 from ajagadish-24/patch-3
Updated the Az.SQL version details and code to identify the latest version
2 parents 02dbee2 + 4d07fba commit 7c9440e

File tree

1 file changed

+28
-19
lines changed

1 file changed

+28
-19
lines changed

articles/synapse-analytics/sql-data-warehouse/sql-data-warehouse-restore-active-paused-dw.md

Lines changed: 28 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ manager: joannapea
66
ms.service: synapse-analytics
77
ms.topic: conceptual
88
ms.subservice: sql-dw
9-
ms.date: 12/07/2022
9+
ms.date: 12/12/2022
1010
ms.author: ajagadish
1111
ms.reviewer: joannapea, wiassaf
1212
ms.custom: seo-lt-2019, devx-track-azurepowershell
@@ -99,21 +99,25 @@ This is similar guidance to restoring an existing dedicated SQL pool, however th
9999

100100
1. Open PowerShell.
101101

102-
2. Update Az.Sql Module to 3.8.0 (or greater) if needed
102+
1. Update Az.Sql Module to 3.8.0 (or greater) if on an older version using `Update-Module`. Otherwise it will cause failures. A PowerShell command to validate the version is below.
103103

104-
3. Connect to your Azure account and list all the subscriptions associated with your account.
104+
```powershell
105+
foreach ($i in (get-module -ListAvailable | ?{$_.name -eq 'az.sql'}).Version) { $version = [string]$i.Major + "." + [string]$i.Minor; if ($version -gt 3.7) {write-host "Az.Sql version $version installed. Prequisite met."} else {update-module az.sql} }
106+
```
105107

106-
4. Select the subscription that contains the database to be restored.
108+
1. Connect to your Azure account and list all the subscriptions associated with your account.
107109

108-
5. List the restore points for the dedicated SQL pool (formerly SQL DW).
110+
1. Select the subscription that contains the database to be restored.
109111

110-
6. Pick the desired restore point using the RestorePointCreationDate.
112+
1. List the restore points for the dedicated SQL pool (formerly SQL DW).
111113

112-
7. Select the destination subscription in which the database should be restored.
114+
1. Pick the desired restore point using the RestorePointCreationDate.
113115

114-
8. Restore the dedicated SQL pool (formerly SQL DW) to the desired restore point using [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.
116+
1. Select the destination subscription in which the database should be restored.
115117

116-
9. Verify that the restored dedicated SQL pool (formerly SQL DW) is online.
118+
1. Restore the dedicated SQL pool (formerly SQL DW) to the desired restore point using [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.
119+
120+
1. Verify that the restored dedicated SQL pool (formerly SQL DW) is online.
117121

118122
```powershell
119123
$SourceSubscriptionName="<YourSubscriptionName>"
@@ -161,16 +165,21 @@ The following PowerShell script for cross-tenant restore works in the same way a
161165
> [!NOTE]
162166
> 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).
163167
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.
168+
1. Open a PowerShell terminal.
169+
1. Update Az.Sql Module to 3.8.0 (or greater) if on an older version using `Update-Module`. Otherwise it will cause failures. A sample PowerShell command to validate the version is below.
170+
171+
```powershell
172+
foreach ($i in (get-module -ListAvailable | ?{$_.name -eq 'az.sql'}).Version) { $version = [string]$i.Major + "." + [string]$i.Minor; if ($version -gt 3.7) {write-host "Az.Sql version $version installed. Prequisite met."} else {update-module az.sql} }
173+
```
174+
175+
1. Connect to your Azure account using `Connect-AzAccount`.
176+
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.
177+
1. List the restore points for the dedicated SQL pool using `Get-AzSqlDatabaseRestorePoint`.
178+
1. Pick the desired restore point, setting the variable `$PointInTime`.
179+
1. In the destination tenant, make sure your user has guest access with either 'Owner' or 'Contributor' permissions.
180+
1. Select the destination subscription along with the corresponding Tenant ID to which the dedicated SQL pool should be restored.
181+
1. Restore the dedicated SQL pool to the desired restore point using `Restore-AzSqlDatabase`.
182+
1. Verify that the restored dedicated SQL pool (formerly SQL DW) is online in the new tenant.
174183

175184
```powershell
176185
$SourceSubscriptionName="<YourSubscriptionName>"

0 commit comments

Comments
 (0)