編輯

共用方式為


Complete-AzSqlInstanceDatabaseCopy

Complete online copy operation of a managed database.

Syntax

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

Description

The Complete-AzSqlInstanceDatabaseCopy cmdlet complete copy operation of a database between two Azure SQL Managed Instances. Destination database will become online and ready for read/write workloads.

Examples

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

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

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

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

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

This command completes copy 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

-CopyModelObject

Object that is returned from start copy operation.

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

-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

-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