Start-AzSqlInstanceDatabaseLogReplay
Starts a Log Replay service with the given parameters.
Syntax
Start-AzSqlInstanceDatabaseLogReplay
[-Name] <String>
[-InstanceName] <String>
[-ResourceGroupName] <String>
-StorageContainerUri <String>
-StorageContainerSasToken <String>
[-AutoCompleteRestore]
[-LastBackupName <String>]
[-Collation <String>]
[-StorageContainerIdentity <String>]
[-AsJob]
[-PassThru]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
LogReplayInstanceDatabaseFromAzureSqlManagedDatabaseModelInstanceDefinition
Start-AzSqlInstanceDatabaseLogReplay
[-InputObject] <AzureSqlManagedDatabaseModel>
-StorageContainerUri <String>
-StorageContainerSasToken <String>
[-AutoCompleteRestore]
[-LastBackupName <String>]
[-Collation <String>]
[-StorageContainerIdentity <String>]
[-AsJob]
[-PassThru]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Start-AzSqlInstanceDatabaseLogReplay cmdlet initiate start of the log replay service.
Examples
Example 1
Start-AzSqlInstanceDatabaseLogReplay -ResourceGroupName "ResourceGroup01" -InstanceName "ManagedInstance01" -Name "ManagedDatabaseName" `
-Collation "SQL_Latin1_General_CP1_CI_AS" -StorageContainerUri "https://test.blob.core.windows.net/testing" `
-StorageContainerSasToken "sv=2019-02-02&ss=b&srt=sco&sp=rl&se=2023-12-02T00:09:14Z&st=2019-11-25T16:09:14Z&spr=https&sig=92kAe4QYmXaht%2Fgjocqwerqwer41s%3D" `
-AutoCompleteRestore -LastBackupName "last_backup.bak"
This command will create new managed database and will start restoring backups from the given container until last_backup.bak is restored.
Example 2
Start-AzSqlInstanceDatabaseLogReplay -ResourceGroupName "ResourceGroup01" -InstanceName "ManagedInstance01" -Name "ManagedDatabaseName" `
-Collation "SQL_Latin1_General_CP1_CI_AS" -StorageContainerUri "https://test.blob.core.windows.net/testing" `
-StorageContainerSasToken "sv=2019-02-02&ss=b&srt=sco&sp=rl&se=2023-12-02T00:09:14Z&st=2019-11-25T16:09:14Z&spr=https&sig=92kAe4QYmXaht%2Fgjocqwerqwer41s%3D"
This command will create new managed database and will start restoring backups from the given container until Complete-AzSqlInstanceDatabaseLogReplay is called with the last backup wanted.
Example 3
Start-AzSqlInstanceDatabaseLogReplay -ResourceGroupName "ResourceGroup01" -InstanceName "ManagedInstance01" -Name "ManagedDatabaseName" `
-StorageContainerIdentity ManagedIdentity -StorageContainerUri "https://test.blob.core.windows.net/testing"
Starts a Log Replay service with container identity specified as ManagedIdentity. In this case there is no need to specify StorageContainerSasToken parameter.
Example 4
Start-AzSqlInstanceDatabaseLogReplay -ResourceGroupName "ResourceGroup01" -InstanceName "ManagedInstance01" -Name "ManagedDatabaseName" `
-StorageContainerIdentity SharedAccessSignature -StorageContainerUri "https://test.blob.core.windows.net/testing" `
-StorageContainerSasToken "sv=2019-02-02&ss=b&srt=sco&sp=rl&se=2023-12-02T00:09:14Z&st=2019-11-25T16:09:14Z&spr=https&sig=92kAe4QYmXaht%2Fgjocqwerqwer41s%3D"
Starts a Log Replay service with container identity specified as SharedAccessSignature. StorageContainerSasToken parameter is required.
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
-AutoCompleteRestore
The indicator whether or not to auto-complete restore upon completion.
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
-Collation
The collation of the instance database to use.
Parameter properties
Type: String
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
The instance database object.
LogReplayInstanceDatabaseFromAzureSqlManagedDatabaseModelInstanceDefinition
Position: 0
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-InstanceName
The name of the instance.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: ManagedInstanceName
Parameter sets
LogReplayInstanceDatabaseFromInputParameters
Position: 1
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-LastBackupName
The name of the last backup file to restore.
Parameter properties
Type: String
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
-Name
The name of the instance database.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: InstanceDatabaseName
Parameter sets
LogReplayInstanceDatabaseFromInputParameters
Position: 0
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-PassThru
Defines Whether return the sync group.
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
-ResourceGroupName
The name of the resource group.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
LogReplayInstanceDatabaseFromInputParameters
Position: 2
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-StorageContainerIdentity
The identity type to use for storage container.
Parameter properties
Type: String
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
-StorageContainerSasToken
The storage container Sas token.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: SasToken
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-StorageContainerUri
The storage container URI.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: Storage
Parameter sets
(All)
Position: Named
Mandatory: True
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
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