Skip to content

Commit 36a9868

Browse files
authored
Updated the Az.SQL version details and code to identify the latest version
1 parent 52917d2 commit 36a9868

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

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

Lines changed: 17 additions & 11 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,7 +99,10 @@ 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+
2. Update Az.Sql Module to 3.8.0 (or greater) if on an older version using `Update-Module`. Otherwise it will cause failures. Powershell command to valiate the version is below.
103+
```powershell
104+
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} }
105+
```
103106

104107
3. Connect to your Azure account and list all the subscriptions associated with your account.
105108

@@ -162,15 +165,18 @@ The following PowerShell script for cross-tenant restore works in the same way a
162165
> 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).
163166
164167
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. Update Az.Sql Module to 3.8.0 (or greater) if on an older version using `Update-Module`. Otherwise it will cause failures. Powershell command to valiate the version is below.
169+
```powershell
170+
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} }
171+
```
172+
3. Connect to your Azure account using `Connect-AzAccount`.
173+
4. 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.
174+
5. List the restore points for the dedicated SQL pool using `Get-AzSqlDatabaseRestorePoint`.
175+
6. Pick the desired restore point, setting the variable `$PointInTime`.
176+
7. In the destination tenant, make sure your user has guest access with either 'Owner' or 'Contributor' permissions.
177+
8. Select the destination subscription along with the corresponding Tenant ID to which the dedicated SQL pool should be restored.
178+
9. Restore the dedicated SQL pool to the desired restore point using `Restore-AzSqlDatabase`.
179+
10. Verify that the restored dedicated SQL pool (formerly SQL DW) is online in the new tenant.
174180

175181
```powershell
176182
$SourceSubscriptionName="<YourSubscriptionName>"

0 commit comments

Comments
 (0)