Get-AzSqlInstanceDatabaseMoveOperation
取得受控資料庫移動作業詳細數據
語法
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
Get-AzSqlInstanceDatabaseMoveOperation Cmdlet 會取得移動受控資料庫作業詳細數據。
範例
範例 1:取得單一 Azure SQL 受控實例上的所有移動作業
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 :
此命令會傳回資源群組 RG1 中 instance1 的所有行動作業。
範例 2:取得一個資料庫的 Azure SQL 受控實例上的所有移動作業
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 :
此命令會傳回資源群組 RG1 實例 1 上資料庫 db2 的所有移動作業。
範例 3:只取得一個資料庫的 Azure SQL 受控實例上的最新移動作業
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 :
此命令會針對資源群組 RG1 實例 RG1 實例 1 上的資料庫 db2 傳回最新的行動作業。
參數
-DatabaseName
Azure SQL 受控實例上的資料庫名稱。
類型: | String |
別名: | Name |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-DatabaseObject
Managed 資料庫物件。
類型: | AzureSqlManagedDatabaseModel |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
-DefaultProfile
用於與 Azure 通訊的認證、帳戶、租用戶和訂用帳戶。
類型: | IAzureContextContainer |
別名: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-InstanceName
實例的名稱。
類型: | String |
Position: | 1 |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
-ModelObject
使用 -PassThru 參數從開始移動或複製作業傳回的物件。
類型: | MoveCopyManagedDatabaseModel |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
-OnlyLatestPerDatabase
每個受控資料庫只傳回最新的作業
類型: | SwitchParameter |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-ResourceGroupName
資源群組的名稱。
類型: | String |
Position: | 0 |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
-ResourceId
受控資料庫的資源標識碼。
類型: | String |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
-TargetInstanceName
目標 Azure SQL 受控實例的名稱。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-TargetResourceGroupName
目標資源群組的名稱。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
輸入
輸出
ManagedDatabaseMoveCopyOperation