Dela via


Get-AzSqlInstanceDatabaseCopyOperation

Hämta information om kopiering av hanterad databas

Syntax

Get-AzSqlInstanceDatabaseCopyOperation
   [-DatabaseName <String>]
   [-TargetResourceGroupName <String>]
   [-TargetInstanceName <String>]
   [-OnlyLatestPerDatabase]
   [-InstanceName] <String>
   [-ResourceGroupName] <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzSqlInstanceDatabaseCopyOperation
   [-DatabaseName <String>]
   [-TargetResourceGroupName <String>]
   [-TargetInstanceName <String>]
   -DatabaseObject <AzureSqlManagedDatabaseModel>
   [-OnlyLatestPerDatabase]
   [-InstanceName] <String>
   [-ResourceGroupName] <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzSqlInstanceDatabaseCopyOperation
   [-DatabaseName <String>]
   [-TargetResourceGroupName <String>]
   [-TargetInstanceName <String>]
   -ModelObject <MoveCopyManagedDatabaseModel>
   [-OnlyLatestPerDatabase]
   [-InstanceName] <String>
   [-ResourceGroupName] <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzSqlInstanceDatabaseCopyOperation
   [-TargetResourceGroupName <String>]
   [-TargetInstanceName <String>]
   -ResourceId <String>
   [-OnlyLatestPerDatabase]
   [-InstanceName] <String>
   [-ResourceGroupName] <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

Cmdleten Get-AzSqlInstanceDatabaseCopyOperation hämta information om kopieringshanterad databasåtgärd.

Exempel

Exempel 1: Hämta all kopieringsåtgärd på en enda Hanterad Azure SQL-instans

Get-AzSqlInstanceDatabaseCopyOperation -ResourceGroupName RG1 -InstanceName instance1

Name                      : 11111111-1111-1111-1111-111111111111
Id                        : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RG1/providers/Microso
                            ft.Sql/locations/westcentralus/managedDatabaseMoveOperationResults/11111111-1111-1111-1111-111111111111
Operation                 : StartCrossManagedInstanceDatabaseMovement
OperationFriendlyName     : Start Azure SQL Managed Instance database copy
StartTime                 : 5/30/2023 10:11:21 AM
State                     : Succeeded
OperationMode             : Copy
SourceManagedInstanceName : instance1
TargetManagedInstanceName : instance2
SourceManagedInstanceId   : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RG1/providers/Microso
                            ft.Sql/managedInstances/instance1
TargetManagedInstanceId   : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RG1/providers/Microsoft.Sql/managedInstances/instance2
SourceDatabaseName        : db1
TargetDatabaseName        : db1
IsCancellable             : True
ErrorCode                 :
ErrorDescription          :
ErrorSeverity             :
IsUserError               :

Name                      : 22222222-2222-2222-2222-222222222222
Id                        : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RG1/providers/Microso
                            ft.Sql/locations/westcentralus/managedDatabaseMoveOperationResults/22222222-2222-2222-2222-222222222222
Operation                 : StartCrossManagedInstanceDatabaseMovement
OperationFriendlyName     : Start Azure SQL Managed Instance database copy
StartTime                 : 5/30/2023 10:11:21 AM
State                     : Succeeded
OperationMode             : Copy
SourceManagedInstanceName : instance1
TargetManagedInstanceName : instance3
SourceManagedInstanceId   : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RG1/providers/Microso
                            ft.Sql/managedInstances/instance1
TargetManagedInstanceId   : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RG1/providers/Microsoft.Sql/managedInstances/instance3
SourceDatabaseName        : db2
TargetDatabaseName        : db2
IsCancellable             : True
ErrorCode                 :
ErrorDescription          :
ErrorSeverity             :
IsUserError               :

Name                      : 33333333-3333-3333-3333-333333333333
Id                        : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RG1/providers/Microso
                            ft.Sql/locations/westcentralus/managedDatabaseMoveOperationResults/33333333-3333-3333-3333-333333333333
Operation                 : CancelCrossManagedInstanceDatabaseMovement
OperationFriendlyName     : Cancel Azure SQL Managed Instance database copy
StartTime                 : 5/30/2023 11:11:21 AM
State                     : Succeeded
OperationMode             : Copy
SourceManagedInstanceName : instance1
TargetManagedInstanceName : instance3
SourceManagedInstanceId   : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RG1/providers/Microso
                            ft.Sql/managedInstances/instance1
TargetManagedInstanceId   : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RG1/providers/Microsoft.Sql/managedInstances/instance3
SourceDatabaseName        : db2
TargetDatabaseName        : db2
IsCancellable             : False
ErrorCode                 :
ErrorDescription          :
ErrorSeverity             :
IsUserError               :

Det här kommandot returnerar alla kopieringsåtgärder för instans 1 i resursgruppen RG1.

Exempel 2: Hämta alla kopieringsåtgärder på Azure SQL Managed Instance för en databas

Get-AzSqlInstanceDatabaseCopyOperation -ResourceGroupName RG1 -InstanceName instance1 -DatabaseName db2

Name                      : 22222222-2222-2222-2222-222222222222
Id                        : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RG1/providers/Microso
                            ft.Sql/locations/westcentralus/managedDatabaseMoveOperationResults/22222222-2222-2222-2222-222222222222
Operation                 : StartCrossManagedInstanceDatabaseMovement
OperationFriendlyName     : Start Azure SQL Managed Instance database copy
StartTime                 : 5/30/2023 10:11:21 AM
State                     : Succeeded
OperationMode             : Copy
SourceManagedInstanceName : instance1
TargetManagedInstanceName : instance3
SourceManagedInstanceId   : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RG1/providers/Microso
                            ft.Sql/managedInstances/instance1
TargetManagedInstanceId   : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RG1/providers/Microsoft.Sql/managedInstances/instance3
SourceDatabaseName        : db2
TargetDatabaseName        : db2
IsCancellable             : True
ErrorCode                 :
ErrorDescription          :
ErrorSeverity             :
IsUserError               :


Name                      : 33333333-3333-3333-3333-333333333333
Id                        : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RG1/providers/Microso
                            ft.Sql/locations/westcentralus/managedDatabaseMoveOperationResults/33333333-3333-3333-3333-333333333333
Operation                 : CancelCrossManagedInstanceDatabaseMovement
OperationFriendlyName     : Cancel Azure SQL Managed Instance database copy
StartTime                 : 5/30/2023 11:11:21 AM
State                     : Succeeded
OperationMode             : Copy
SourceManagedInstanceName : instance1
TargetManagedInstanceName : instance3
SourceManagedInstanceId   : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RG1/providers/Microso
                            ft.Sql/managedInstances/instance1
TargetManagedInstanceId   : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RG1/providers/Microsoft.Sql/managedInstances/instance3
SourceDatabaseName        : db2
TargetDatabaseName        : db2
IsCancellable             : False
ErrorCode                 :
ErrorDescription          :
ErrorSeverity             :
IsUserError               :

Det här kommandot returnerar alla kopieringsåtgärder för databas db2 på instans 1 i resursgruppen RG1.

Exempel 3: Hämta endast den senaste kopieringsåtgärden på Azure SQL Managed Instance för en databas

Get-AzSqlInstanceDatabaseCopyOperation -ResourceGroupName RG1 -InstanceName instance1 -DatabaseName db2 -OnlyLatestPerDatabase

Name                      : 33333333-3333-3333-3333-333333333333
Id                        : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RG1/providers/Microso
                            ft.Sql/locations/westcentralus/managedDatabaseMoveOperationResults/33333333-3333-3333-3333-333333333333
Operation                 : CancelCrossManagedInstanceDatabaseMovement
OperationFriendlyName     : Cancel Azure SQL Managed Instance database copy
StartTime                 : 5/30/2023 11:11:21 AM
State                     : Succeeded
OperationMode             : Copy
SourceManagedInstanceName : instance1
TargetManagedInstanceName : instance3
SourceManagedInstanceId   : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RG1/providers/Microso
                            ft.Sql/managedInstances/instance1
TargetManagedInstanceId   : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RG1/providers/Microsoft.Sql/managedInstances/instance3
SourceDatabaseName        : db2
TargetDatabaseName        : db2
IsCancellable             : False
ErrorCode                 :
ErrorDescription          :
ErrorSeverity             :
IsUserError               :

Det här kommandot returnerar den senaste kopieringsåtgärden för databas db2 på instans 1 i resursgruppen RG1.

Parametrar

-DatabaseName

Namnet på en databas på Azure SQL Managed Instance.

Typ:String
Alias:Name
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-DatabaseObject

Hanterat databasobjekt.

Typ:AzureSqlManagedDatabaseModel
Position:Named
Standardvärde:None
Obligatorisk:True
Godkänn pipeline-indata:True
Godkänn jokertecken:False

-DefaultProfile

Autentiseringsuppgifter, konto, klientorganisation och prenumeration som används för kommunikation med Azure.

Typ:IAzureContextContainer
Alias:AzContext, AzureRmContext, AzureCredential
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-InstanceName

Namnet på instansen.

Typ:String
Position:1
Standardvärde:None
Obligatorisk:True
Godkänn pipeline-indata:True
Godkänn jokertecken:False

-ModelObject

Objekt som returneras från startflytt eller kopieringsåtgärd med hjälp av -PassThru parameter.

Typ:MoveCopyManagedDatabaseModel
Position:Named
Standardvärde:None
Obligatorisk:True
Godkänn pipeline-indata:True
Godkänn jokertecken:False

-OnlyLatestPerDatabase

Returnera endast den senaste opereationen per hanterad databas

Typ:SwitchParameter
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-ResourceGroupName

Namnet på resursgruppen.

Typ:String
Position:0
Standardvärde:None
Obligatorisk:True
Godkänn pipeline-indata:True
Godkänn jokertecken:False

-ResourceId

Resurs-ID för hanterad databas.

Typ:String
Position:Named
Standardvärde:None
Obligatorisk:True
Godkänn pipeline-indata:True
Godkänn jokertecken:False

-TargetInstanceName

Namnet på den azure SQL-hanterade målinstansen.

Typ:String
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-TargetResourceGroupName

Namnet på målresursgruppen.

Typ:String
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

Indata

String

AzureSqlManagedDatabaseModel

MoveCopyManagedDatabaseModel

Utdata

ManagedDatabaseMoveCopyOperation