편집

다음을 통해 공유


Move-AzSqlInstanceDatabase

Move managed database to another managed instance.

Syntax

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

Description

The Move-AzSqlInstanceDatabase cmdlet start online move operation of a database across managed instances by using Always On availability group technology. Learn more

Examples

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

Move-AzSqlInstanceDatabase -ResourceGroupName RG1 -InstanceName MI1 -Name database1 -TargetInstanceName MI2

This command moves database1 from instance MI1 to MI2

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

Move-AzSqlInstanceDatabase -ResourceGroupName RG1 -InstanceName MI1 -Name database1 -TargetResourceGroupName RG2 -TargetInstanceName MI2

This command moves database1 from instance MI1 in resource group RG1 to 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

-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

String

AzureSqlManagedDatabaseModel

ManagedDatabaseMoveCopyOperation

Outputs

MoveCopyManagedDatabaseModel