@@ -164,12 +164,12 @@ Get-AzSubscription
164
164
Select-AzSubscription -SubscriptionName $SourceSubscriptionName
165
165
166
166
# list all restore points
167
- Get-AzSynapseSqlPoolRestorePoint -ResourceGroupName $ResourceGroupName -WorkspaceName $WorkspaceName -Name $SQLPoolName
167
+ Get-AzSynapseSqlPoolRestorePoint -ResourceGroupName $ResourceGroupName -WorkspaceName $SourceWorkspaceName -Name $SourceSQLPoolName
168
168
# Pick desired restore point using RestorePointCreationDate "xx/xx/xxxx xx:xx:xx xx"
169
169
$PointInTime="<RestorePointCreationDate>"
170
170
171
171
# Get the specific SQL pool to restore
172
- $SQLPool = Get-AzSynapseSqlPool -ResourceGroupName $ResourceGroupName -WorkspaceName $WorkspaceName -Name $SQLPoolName
172
+ $SQLPool = Get-AzSynapseSqlPool -ResourceGroupName $ResourceGroupName -WorkspaceName $SourceWorkspaceName -Name $SourceSQLPoolName
173
173
# Transform Synapse SQL pool resource ID to SQL database ID because currently the restore command only accepts the SQL database ID format.
174
174
$DatabaseID = $SQLPool.Id -replace "Microsoft.Synapse", "Microsoft.Sql" `
175
175
-replace "workspaces", "servers" `
@@ -180,7 +180,7 @@ Select-AzSubscription -SubscriptionName $TargetSubscriptionName
180
180
181
181
# Restore database from a desired restore point of the source database to the target server in the desired subscription
182
182
$RestoredDatabase = Restore-AzSqlDatabase –FromPointInTimeBackup –PointInTime $PointInTime -ResourceGroupName $TargetResourceGroupName `
183
- -ServerName $TargetServerName -TargetDatabaseName $TargetDatabaseName –ResourceId $Database.ID
183
+ -ServerName $TargetServerName -TargetDatabaseName $TargetDatabaseName –ResourceId $DatabaseID
184
184
185
185
# Verify the status of restored database
186
186
$RestoredDatabase.status
@@ -200,9 +200,9 @@ $RestoredDatabase.status
200
200
201
201
## Troubleshooting
202
202
A restore operation can result in a deployment failure based on a "RequestTimeout" exception.
203
- ![ TimeoutException ] ( ../media/sql-pools/restore-sqlpool- troubleshooting-01.PNG )
203
+ ![ Screenshot of timeout exception. ] ( ../media/sql-pools/restore-sql-pool- troubleshooting-01.png )
204
204
This timeout can be ignored. Review the dedicated SQL pool blade in the portal and it may still have status of "Restoring" and eventually will transition to "Online".
205
- ![ Restoring ] ( ../media/sql-pools/restore-sqlpool -troubleshooting-02.png )
205
+ ![ Screenshot of SQL pool restoring. ] ( ../media/sql-pools/restore-sql-pool -troubleshooting-02.png )
206
206
207
207
## Next Steps
208
208
0 commit comments