編輯

共用方式為


Get-AzDataMigrationToSqlDb

Retrieve the specified database migration for a given SQL Db.

Syntax

Get-AzDataMigrationToSqlDb
   -ResourceGroupName <String>
   -SqlDbInstanceName <String>
   [-SubscriptionId <String[]>]
   -TargetDbName <String>
   [-Expand <String>]
   [-MigrationOperationId <String>]
   [-DefaultProfile <PSObject>]
   [-PassThru]
   [<CommonParameters>]
Get-AzDataMigrationToSqlDb
   -InputObject <IDataMigrationIdentity>
   [-Expand <String>]
   [-MigrationOperationId <String>]
   [-DefaultProfile <PSObject>]
   [-PassThru]
   [<CommonParameters>]

Description

Retrieve the specified database migration for a given SQL Db.

Examples

Example 1: Get the details of a given Database Migration to a SQL DB

Get-AzDataMigrationToSqlDb -ResourceGroupName "myRG" -SqlDbInstanceName "mySqlDb" -TargetDbName "mydb1"

Name       Kind  ProvisioningState MigrationStatus
----       ----  ----------------- ---------------
mydb1 SqlDb Succeeded         InProgress

Get the details of a given Database Migration to a SQL DB

Example 2: Get the expanded details of a given Database Migration to a SQL DB

$dbMigration = Get-AzDataMigrationToSqlDb -ResourceGroupName "myRG" -SqlDbInstanceName "mySqlDb" -TargetDbName "mydb1" -Expand MigrationStatusDetails
$dbMigration.MigrationStatusDetailMigrationState

MonitorMigration

Get the expanded details of a given Database Migration to a SQL DB

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

-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

-SqlDbInstanceName

.

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

Inputs

IDataMigrationIdentity

Outputs

IDatabaseMigrationSqlDb