你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Start-AzSqlInstanceDatabaseLogReplay

Starts a Log Replay service with the given parameters.

Syntax

Start-AzSqlInstanceDatabaseLogReplay
     -StorageContainerUri <String>
     -StorageContainerSasToken <String>
     [-AutoCompleteRestore]
     [-LastBackupName <String>]
     [-Collation <String>]
     [-StorageContainerIdentity <String>]
     [-AsJob]
     [-Name] <String>
     [-InstanceName] <String>
     [-ResourceGroupName] <String>
     [-PassThru]
     [-DefaultProfile <IAzureContextContainer>]
     [-WhatIf]
     [-Confirm]
     [<CommonParameters>]
Start-AzSqlInstanceDatabaseLogReplay
     -StorageContainerUri <String>
     -StorageContainerSasToken <String>
     [-AutoCompleteRestore]
     [-LastBackupName <String>]
     [-Collation <String>]
     [-StorageContainerIdentity <String>]
     [-AsJob]
     [-PassThru]
     [-InputObject] <AzureSqlManagedDatabaseModel>
     [-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

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-AutoCompleteRestore

The indicator whether or not to auto-complete restore upon completion.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Collation

The collation of the instance database to use.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-InputObject

The instance database object.

Type:AzureSqlManagedDatabaseModel
Aliases:InstanceDatabase
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-InstanceName

The name of the instance.

Type:String
Aliases:ManagedInstanceName
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-LastBackupName

The name of the last backup file to restore.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Name

The name of the instance database.

Type:String
Aliases:InstanceDatabaseName
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-PassThru

Defines Whether return the sync group.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

The name of the resource group.

Type:String
Position:2
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-StorageContainerIdentity

The identity type to use for storage container.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-StorageContainerSasToken

The storage container Sas token.

Type:String
Aliases:SasToken
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-StorageContainerUri

The storage container URI.

Type:String
Aliases:Storage
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

String

AzureSqlManagedDatabaseModel

Outputs

AzureSqlManagedDatabaseModel