Get-AzDataMigrationToSqlManagedInstance
Retrieve the specified database migration for a given SQL Managed Instance.
Syntax
Get-AzDataMigrationToSqlManagedInstance
-ManagedInstanceName <String>
-ResourceGroupName <String>
[-SubscriptionId <String[]>]
-TargetDbName <String>
[-Expand <String>]
[-MigrationOperationId <String>]
[-DefaultProfile <PSObject>]
[-PassThru]
[<CommonParameters>]
Get-AzDataMigrationToSqlManagedInstance
-InputObject <IDataMigrationIdentity>
[-Expand <String>]
[-MigrationOperationId <String>]
[-DefaultProfile <PSObject>]
[-PassThru]
[<CommonParameters>]
Description
Retrieve the specified database migration for a given SQL Managed Instance.
Examples
Example 1: Get the details of a given Database Migration to a SQL Managed Instance
Get-AzDataMigrationToSqlManagedInstance -ResourceGroupName "MyResourceGroup" -ManagedInstanceName "MyManagedInstance" -TargetDbName "MyDatabase"
Name Type Kind ProvisioningState MigrationStatus
---- ---- ---- ----------------- ---------------
MyDatabase Microsoft.DataMigration/databaseMigrations SqlMi Succeeded Succeeded
This command gets the details of a given Database Migration to a SQL Managed Instance.
Example 2: Get the expanded details of a given Database Migration to a SQL Managed Instance
$miMigration = Get-AzDataMigrationToSqlManagedInstance -ResourceGroupName "MyResourceGroup" -ManagedInstanceName "MyManagedInstance" -TargetDbName "MyDatabase" -Expand MigrationStatusDetails
$miMigration.MigrationStatusDetail
BlobContainerName CompleteRestoreErrorMessage CurrentRestoringFilename FileUploadBlockingError
----------------- --------------------------- ------------------------ -----------------------
2673894b-451c-41cv-ae2b-58a8eefe3546 AdventureWorks.bak
This command gets the expanded details of a given Database Migration to a SQL Managed Instance.
Parameters
-DefaultProfile
The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
Type: | PSObject |
Aliases: | AzureRMContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Expand
Complete migration details be included in the response.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InputObject
Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
Type: | IDataMigrationIdentity |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ManagedInstanceName
.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-MigrationOperationId
Optional migration operation ID. If this is provided, then details of migration operation for that ID are retrieved. If not provided (default), then details related to most recent or current operation are retrieved.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PassThru
Returns true when the command succeeds
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceGroupName
Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SubscriptionId
Subscription ID that identifies an Azure subscription.
Type: | String[] |
Position: | Named |
Default value: | (Get-AzContext).Subscription.Id |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-TargetDbName
The name of the target database.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |