編輯

共用方式為


Complete-AzSqlInstanceDatabaseMove

Complete online move operation of a managed database.

Syntax

Complete-AzSqlInstanceDatabaseMove
        [-Force]
        -DatabaseName <String>
        -InstanceName <String>
        -ResourceGroupName <String>
        [-TargetSubscriptionId <String>]
        [-TargetResourceGroupName <String>]
        -TargetInstanceName <String>
        [-AsJob]
        [-PassThru]
        [-DefaultProfile <IAzureContextContainer>]
        [-WhatIf]
        [-Confirm]
        [<CommonParameters>]
Complete-AzSqlInstanceDatabaseMove
        [-Force]
        -MoveModelObject <MoveCopyManagedDatabaseModel>
        [-AsJob]
        [-PassThru]
        [-DefaultProfile <IAzureContextContainer>]
        [-WhatIf]
        [-Confirm]
        [<CommonParameters>]
Complete-AzSqlInstanceDatabaseMove
        [-Force]
        [-DatabaseName <String>]
        [-InstanceName <String>]
        [-ResourceGroupName <String>]
        -MoveCopyOperationObject <ManagedDatabaseMoveCopyOperation>
        [-AsJob]
        [-PassThru]
        [-DefaultProfile <IAzureContextContainer>]
        [-WhatIf]
        [-Confirm]
        [<CommonParameters>]
Complete-AzSqlInstanceDatabaseMove
        [-Force]
        -InstanceName <String>
        -ResourceGroupName <String>
        [-TargetSubscriptionId <String>]
        [-TargetResourceGroupName <String>]
        -TargetInstanceName <String>
        -DatabaseObject <AzureSqlManagedDatabaseModel>
        [-AsJob]
        [-PassThru]
        [-DefaultProfile <IAzureContextContainer>]
        [-WhatIf]
        [-Confirm]
        [<CommonParameters>]
Complete-AzSqlInstanceDatabaseMove
        [-Force]
        -InstanceName <String>
        -ResourceGroupName <String>
        [-TargetSubscriptionId <String>]
        [-TargetResourceGroupName <String>]
        -TargetInstanceName <String>
        -ResourceId <String>
        [-AsJob]
        [-PassThru]
        [-DefaultProfile <IAzureContextContainer>]
        [-WhatIf]
        [-Confirm]
        [<CommonParameters>]

Description

The Complete-AzSqlInstanceDatabaseMove cmdlet complete move operation of a database between two Azure SQL Managed Instances. Destination database will become online and ready for read/write workloads and source database will be dropped.

Examples

Example 1: Complete move database to another Managed Instance in the same resource group

Complete-AzSqlInstanceDatabaseMove -ResourceGroupName RG1 -InstanceName MI1 -Name database1 -TargetInstanceName MI2

This command completes move operation of database1 on instance MI1 to instance MI2

Example 2: Complete move database to another Managed Instance in the different resource group

Complete-AzSqlInstanceDatabaseMove -ResourceGroupName RG1 -InstanceName MI1 -Name database1 -TargetResourceGroupName RG2 -TargetInstanceName MI2

This command completes move operation of database1 on instance MI1 in resource group RG1 to instance MI2 in resource group RG2

Parameters

-AsJob

Run cmdlet in the background

Type:SwitchParameter
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

-DatabaseName

Name of the instance database.

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

-DatabaseObject

Managed database object.

Type:AzureSqlManagedDatabaseModel
Position:Named
Default value:None
Required:True
Accept pipeline input:True
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

-Force

Do not ask for confirmation

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

-InstanceName

Name of the source instance.

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

-MoveCopyOperationObject

Managed database move or copy operation object.

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

-MoveModelObject

Object that is returned from start move operation.

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

-PassThru

Signal to receive output from a cmdlet which does not return anything

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

-ResourceGroupName

Name of the source resource group.

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

-ResourceId

Resource id of managed database.

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

-TargetInstanceName

Name of the target Azure SQL Managed Instance.

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

-TargetResourceGroupName

Name of the target resource group.

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

-TargetSubscriptionId

Id of the target subscription.

Type:String
Position:Named
Default value:None
Required:False
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

MoveCopyManagedDatabaseModel

String

AzureSqlManagedDatabaseModel

ManagedDatabaseMoveCopyOperation

Outputs

Boolean