Get-AzSqlInstanceDatabaseMoveOperation
Obter detalhes da operação de movimentação do banco de dados gerenciado
Sintaxe
Get-AzSqlInstanceDatabaseMoveOperation
[-DatabaseName <String>]
[-TargetResourceGroupName <String>]
[-TargetInstanceName <String>]
[-OnlyLatestPerDatabase]
[-InstanceName] <String>
[-ResourceGroupName] <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzSqlInstanceDatabaseMoveOperation
[-DatabaseName <String>]
[-TargetResourceGroupName <String>]
[-TargetInstanceName <String>]
-DatabaseObject <AzureSqlManagedDatabaseModel>
[-OnlyLatestPerDatabase]
[-InstanceName] <String>
[-ResourceGroupName] <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzSqlInstanceDatabaseMoveOperation
[-DatabaseName <String>]
[-TargetResourceGroupName <String>]
[-TargetInstanceName <String>]
-ModelObject <MoveCopyManagedDatabaseModel>
[-OnlyLatestPerDatabase]
[-InstanceName] <String>
[-ResourceGroupName] <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzSqlInstanceDatabaseMoveOperation
[-TargetResourceGroupName <String>]
[-TargetInstanceName <String>]
-ResourceId <String>
[-OnlyLatestPerDatabase]
[-InstanceName] <String>
[-ResourceGroupName] <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
O cmdlet Get-AzSqlInstanceDatabaseMoveOperation obtém detalhes da operação do banco de dados gerenciado de movimentação.
Exemplos
Exemplo 1: Obter todas as operações de movimentação em uma única instância gerenciada SQL do Azure
Get-AzSqlInstanceDatabaseMoveOperation -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 move
StartTime : 5/30/2023 10:11:21 AM
State : Succeeded
OperationMode : Move
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 move
StartTime : 5/30/2023 10:11:21 AM
State : Succeeded
OperationMode : Move
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 move
StartTime : 5/30/2023 11:11:21 AM
State : Succeeded
OperationMode : Move
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 :
Este comando retornará todas as operações de movimentação, por exemplo, instance1 no grupo de recursos RG1.
Exemplo 2: Obter todas as operações de movimentação na Instância Gerenciada SQL do Azure para um banco de dados
Get-AzSqlInstanceDatabaseMoveOperation -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 move
StartTime : 5/30/2023 10:11:21 AM
State : Succeeded
OperationMode : Move
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 move
StartTime : 5/30/2023 11:11:21 AM
State : Succeeded
OperationMode : Move
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 :
Este comando retornará todas as operações de movimentação para o banco de dados db2 na instância instância1 no grupo de recursos RG1.
Exemplo 3: Obter apenas a operação de movimentação mais recente na Instância Gerenciada SQL do Azure para um banco de dados
Get-AzSqlInstanceDatabaseMoveOperation -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 move
StartTime : 5/30/2023 11:11:21 AM
State : Succeeded
OperationMode : Move
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 :
Este comando retornará a operação de movimentação mais recente para o banco de dados db2 na instância instância1 no grupo de recursos RG1.
Parâmetros
-DatabaseName
Nome de um banco de dados na Instância Gerenciada SQL do Azure.
Tipo: | String |
Aliases: | Name |
Position: | Named |
Default value: | None |
Necessário: | False |
Aceitar entrada de pipeline: | False |
Aceitar carateres universais: | False |
-DatabaseObject
Objeto de banco de dados gerenciado.
Tipo: | AzureSqlManagedDatabaseModel |
Position: | Named |
Default value: | None |
Necessário: | True |
Aceitar entrada de pipeline: | True |
Aceitar carateres universais: | False |
-DefaultProfile
As credenciais, a conta, o locatário e a assinatura usados para comunicação com o Azure.
Tipo: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Necessário: | False |
Aceitar entrada de pipeline: | False |
Aceitar carateres universais: | False |
-InstanceName
O nome da instância.
Tipo: | String |
Position: | 1 |
Default value: | None |
Necessário: | True |
Aceitar entrada de pipeline: | True |
Aceitar carateres universais: | False |
-ModelObject
Objeto retornado da operação de início, movimentação ou cópia usando o parâmetro -PassThru.
Tipo: | MoveCopyManagedDatabaseModel |
Position: | Named |
Default value: | None |
Necessário: | True |
Aceitar entrada de pipeline: | True |
Aceitar carateres universais: | False |
-OnlyLatestPerDatabase
Retornar somente a operação mais recente por banco de dados gerenciado
Tipo: | SwitchParameter |
Position: | Named |
Default value: | None |
Necessário: | False |
Aceitar entrada de pipeline: | False |
Aceitar carateres universais: | False |
-ResourceGroupName
O nome do grupo de recursos.
Tipo: | String |
Position: | 0 |
Default value: | None |
Necessário: | True |
Aceitar entrada de pipeline: | True |
Aceitar carateres universais: | False |
-ResourceId
ID do recurso do banco de dados gerenciado.
Tipo: | String |
Position: | Named |
Default value: | None |
Necessário: | True |
Aceitar entrada de pipeline: | True |
Aceitar carateres universais: | False |
-TargetInstanceName
Nome da Instância Gerenciada SQL do Azure de destino.
Tipo: | String |
Position: | Named |
Default value: | None |
Necessário: | False |
Aceitar entrada de pipeline: | False |
Aceitar carateres universais: | False |
-TargetResourceGroupName
Nome do grupo de recursos de destino.
Tipo: | String |
Position: | Named |
Default value: | None |
Necessário: | False |
Aceitar entrada de pipeline: | False |
Aceitar carateres universais: | False |
Entradas
Saídas
ManagedDatabaseMoveCopyOperation