Restore-AzSynapseSqlPool
Restores a Synapse Analytics SQL pool.
Syntax
RestoreFromBackupIdByNameParameterSet (Default)
Restore-AzSynapseSqlPool
-WorkspaceName <String>
-Name <String>
-ResourceId <String>
[-FromBackup]
[-ResourceGroupName <String>]
[-Tag <Hashtable>]
[-StorageAccountType <String>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
RestoreFromBackupIdByParentObjectParameterSet
Restore-AzSynapseSqlPool
-WorkspaceObject <PSSynapseWorkspace>
-Name <String>
-ResourceId <String>
[-FromBackup]
[-Tag <Hashtable>]
[-StorageAccountType <String>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
RestoreFromRestorePointIdByNameParameterSet
Restore-AzSynapseSqlPool
-WorkspaceName <String>
-Name <String>
-PerformanceLevel <String>
-ResourceId <String>
-RestorePoint <DateTime>
[-FromRestorePoint]
[-ResourceGroupName <String>]
[-Tag <Hashtable>]
[-StorageAccountType <String>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
RestoreFromRestorePointIdByParentObjectParameterSet
Restore-AzSynapseSqlPool
-WorkspaceObject <PSSynapseWorkspace>
-Name <String>
-PerformanceLevel <String>
-ResourceId <String>
-RestorePoint <DateTime>
[-FromRestorePoint]
[-Tag <Hashtable>]
[-StorageAccountType <String>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
RestoreFromDroppedSqlPoolByNameParameterSet
Restore-AzSynapseSqlPool
-WorkspaceName <String>
-Name <String>
-ResourceId <String>
-DeletionDate <DateTime>
[-FromDroppedSqlPool]
[-ResourceGroupName <String>]
[-Tag <Hashtable>]
[-StorageAccountType <String>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
RestoreFromDroppedSqlPoolByParentObjectParameterSet
Restore-AzSynapseSqlPool
-WorkspaceObject <PSSynapseWorkspace>
-Name <String>
-ResourceId <String>
-DeletionDate <DateTime>
[-FromDroppedSqlPool]
[-Tag <Hashtable>]
[-StorageAccountType <String>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Restore-AzSynapseSqlPool cmdlet restores an Azure Synapse Analytics SQL pool from a geo-redundant backup, a backup of a deleted SQL pool or a restore point of any SQL pool.
The restored SQL pool is created as a new SQL pool.
Examples
Example 1
$pool = Get-AzSynapseSqlPool -ResourceGroupName ContosoResourceGroup -WorkspaceName ContosoWorkspace -Name ContosoSqlPool
# Get the latest restore point
$restorePoint = $pool | Get-AzSynapseSqlPoolRestorePoint | Select-Object -Last 1
# Restore to same workspace with source SQL pool
$restoredPool = Restore-AzSynapseSqlPool -FromRestorePoint -RestorePoint $restorePoint.RestorePointCreationDate -TargetSqlPoolName ContosoRestoredSqlPool -ResourceGroupName $pool.ResourceGroupName -WorkspaceName $pool.WorkspaceName -ResourceId $pool.Id -PerformanceLevel DW200c
This command creates an Azure Synapse Analytics SQL pool by leveraging a restore point from any existing SQL pool to recover or copy from a previous state.
Example 2
$pool = Get-AzSynapseSqlPoolGeoBackup -ResourceGroupName ContosoResourceGroup -WorkspaceName ContosoWorkspace -Name ContosoSqlPool
# Restore to same workspace with source SQL pool
$restoredPool = Restore-AzSynapseSqlPool -FromBackup -TargetSqlPoolName ContosoRestoredSqlPool -ResourceGroupName $pool.ResourceGroupName -WorkspaceName $pool.WorkspaceName -ResourceId $pool.Id
This command creates an Azure Synapse Analytics SQL pool which restores from the SQL pool backup.
Example 3
$pool = Get-AzSynapseDroppedSqlPool -ResourceGroupName ContosoResourceGroup -WorkspaceName ContosoWorkspace -Name ContosoSqlPool
$poolId = $pool.Id.Split(",")[0]
# Restore to same workspace with source SQL pool
$restoredPool = Restore-AzSynapseSqlPool -FromDroppedSqlPool -DeletionDate $pool.DeletionDate -TargetSqlPoolName ContosoRestoredSqlPool -ResourceGroupName $pool.ResourceGroupName -WorkspaceName $pool.WorkspaceName -ResourceId $poolId
This command creates an Azure Synapse Analytics SQL pool which restores from the deleted SQL pool backup.
Example 4
$pool = Get-AzSynapseSqlPool -ResourceGroupName ContosoResourceGroup -WorkspaceName ContosoWorkspace -Name ContosoSqlPool
# Get the latest restore point
$restorePoint = $pool | Get-AzSynapseSqlPoolRestorePoint | Select-Object -Last 1
# Restore to same workspace with source SQL pool
$restoredPool = Restore-AzSynapseSqlPool -FromRestorePoint -RestorePoint $restorePoint.RestorePointCreationDate -TargetSqlPoolName ContosoRestoredSqlPool -ResourceGroupName $pool.ResourceGroupName -WorkspaceName $pool.WorkspaceName -ResourceId $pool.Id -PerformanceLevel DW200c -Tag @{"tagName" = "tagValue"} -StorageAccountType LRS
This command creates an Azure Synapse Analytics SQL pool with specified tags and storage account type by leveraging a restore point from any existing SQL pool to recover or copy from a previous state.
Parameters
-AsJob
Run cmdlet in the background
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: cf
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Parameter properties
Type: IAzureContextContainer
Default value: None
Supports wildcards: False
DontShow: False
Aliases: AzContext, AzureRmContext, AzureCredential
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DeletionDate
The deletion date of the Azure Synapse SQL Database to retrieve backups for, with millisecond precision (e.g. 2016-02-23T00:21:22.847Z)
Parameter properties
Type: DateTime
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
RestoreFromDroppedSqlPoolByNameParameterSet
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
RestoreFromDroppedSqlPoolByParentObjectParameterSet
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-FromBackup
Indicates to restore from the most recent backup of any SQL pool in this subscription.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
RestoreFromBackupIdByNameParameterSet
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
RestoreFromBackupIdByParentObjectParameterSet
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-FromDroppedSqlPool
Indicates to leverage a restore point from any SQL pool in this subscription to recover or copy from a previous state.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
RestoreFromDroppedSqlPoolByNameParameterSet
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
RestoreFromDroppedSqlPoolByParentObjectParameterSet
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-FromRestorePoint
Indicates to leverage a restore point from any SQL pool in this subscription to recover or copy from a previous state.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
RestoreFromRestorePointIdByNameParameterSet
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
RestoreFromRestorePointIdByParentObjectParameterSet
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Name
Name of Synapse SQL pool.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: TargetSqlPoolName
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
The SQL Service tier and performance level to assign to the SQL pool.
For example, DW2000c.
Type: String
Default value: None
Supports wildcards: False
DontShow: False
RestoreFromRestorePointIdByNameParameterSet
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
RestoreFromRestorePointIdByParentObjectParameterSet
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ResourceGroupName
Resource group name.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
RestoreFromBackupIdByNameParameterSet
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
RestoreFromRestorePointIdByNameParameterSet
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
RestoreFromDroppedSqlPoolByNameParameterSet
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ResourceId
The resource ID of the database to restore.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-RestorePoint
Snapshot time to restore.
Parameter properties
Type: DateTime
Default value: None
Supports wildcards: False
DontShow: False
Aliases: PointInTime
Parameter sets
RestoreFromRestorePointIdByNameParameterSet
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
RestoreFromRestorePointIdByParentObjectParameterSet
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-StorageAccountType
The storage account type used to store backups for the sql pool. Possible values include: 'GRS', 'LRS'.
Parameter properties
Type: String
Default value: None
Accepted values: GRS, LRS
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Tag
A string,string dictionary of tags associated with the resource.
Parameter properties
Type: Hashtable
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: wi
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-WorkspaceName
Name of Synapse workspace.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
RestoreFromBackupIdByNameParameterSet
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
RestoreFromRestorePointIdByNameParameterSet
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
RestoreFromDroppedSqlPoolByNameParameterSet
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-WorkspaceObject
workspace input object, usually passed through the pipeline.
Parameter properties
Parameter sets
RestoreFromBackupIdByParentObjectParameterSet
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
RestoreFromRestorePointIdByParentObjectParameterSet
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
RestoreFromDroppedSqlPoolByParentObjectParameterSet
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters .
Outputs