Queries the details of a data migration task.

When you call this operation, the data migration task must be in the Migrating, Failed, Paused, or Finished state.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeMigrationJobDetail

The operation that you want to perform. Set the value to DescribeMigrationJobDetail.

MigrationJobId String Yes dtsta7w132u12h****

The ID of the data migration instance. You can call the DescribeMigrationJobs operation to query the instance ID.

RegionId String No cn-hangzhou

The ID of the region where the data migration instance resides. For more information, see List of supported regions.

PageSize Integer No 30

The number of entries to return on each page. Valid values: 30, 50, and 100. Default value: 30.

PageNum Integer No 1

The number of the page to return. The value must be an integer that is greater than 0 and does not exceed the maximum value of the Integer data type. Default value: 1.

MigrationMode.StructureInitialization Boolean No true

Specifies whether to query the details of schema migration. Valid values:

  • true: yes
  • false: no
    Note Default value: false
MigrationMode.DataInitialization Boolean No true

Specifies whether to query the details of full data migration. Valid values:

  • true: yes
  • false: no
    Note Default value: false
MigrationMode.DataSynchronization Boolean No true

Specifies whether to query the details of incremental data migration. Valid values:

  • true: yes
  • false: no
    Note Default value: false
ClientToken String No 0c593ea1-3bea-11e9-b96b-88e9fe63****

The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must make sure that the value is unique among different requests. The ClientToken value can contain only ASCII characters and cannot exceed 64 characters in length.

AccountId String No 12323344****

The ID of the Alibaba Cloud account. You do not need to specify this parameter because this parameter will be removed in the future.

Response parameters

Parameter Type Example Description
DataSynchronizationDetailList Array of DataSynchronizationDetail

The details of incremental data migration.

DataSynchronizationDetail
DestinationOwnerDBName String dtstestdata

The name of the database to which the migration object in the destination instance belongs.

ErrorMessage String The task has failed for a long time and cannot be recovered.

The error message returned if incremental data migration failed.

SourceOwnerDBName String dtstestdata

The name of the database to which the migration object in the source instance belongs.

Status String Migrating

The status of incremental data migration. Valid values:

  • NotStarted: Incremental data migration is not started.
  • Migrating: Incremental data migration is in progress.
  • Failed: Incremental data migration failed.
  • Finished: Incremental data migration is completed.
TableName String customer

The table name.

DataInitializationDetailList Array of DataInitializationDetail

The details of full data migration.

DataInitializationDetail
DestinationOwnerDBName String dtstestdata

The name of the database to which the migration object in the destination instance belongs.

ErrorMessage String java.lang.NumberFormatException: For input string: ""

The error message returned if full data migration failed.

FinishRowNum String 200001

The number of records that have been migrated.

MigrationTime String 0.0

The time taken by full data migration.

SourceOwnerDBName String dtstestdata

The name of the database to which the migration object in the source instance belongs.

Status String Finished

The status of full data migration. Valid values:

  • NotStarted: Full data migration is not started.
  • Migrating: Full data migration is in progress.
  • Failed: Full data migration failed.
  • Finished: Full data migration is completed.
TableName String customer

The table name.

TotalRowNum String 201477

The total number of records that are supposed to be migrated by the task.

ErrCode String InternalError

The error code returned if the call failed.

ErrMessage String The request processing has failed due to some unknown error.

The error message returned if the call failed.

PageNumber Integer 1

The page number of the returned page.

PageRecordCount Integer 30

The maximum number of data migration instances that can be displayed on one page.

RequestId String 0AE3CD0B-4148-426F-A90E-952467CC****

The ID of the request.

StructureInitializationDetailList Array of StructureInitializationDetail

The details of schema migration.

StructureInitializationDetail
ConstraintList Array of StructureInitializationDetail

The constraints of the migration object, such as indexes and foreign keys.

Note This parameter is returned only if the ObjectType parameter is set to Table and the migration object has constraints.
StructureInitializationDetail
DestinationOwnerDBName String dtstestdata

The name of the database to which the migration object in the destination instance belongs.

ErrorMessage String DTS-1020042 Execute sql error sql: ERROR: type "geometry" does not exist;

The error message returned if constraints failed to be created.

ObjectDefinition String CREATE SEQUENCE "public"."collections_id_seq" MINVALUE 1 MAXVALUE 9223372036854775807 START 249 INCREMENT BY 1 ;

The syntax to create constraints.

ObjectName String customer

The name of migration object.

ObjectType String Table

The type of the migration object. The value is Table.

SourceOwnerDBName String dtstestdata

The name of the database to which the migration object in the source instance belongs.

Status String Finished

The status of constraint creation. Valid values:

  • NotStarted
  • Migrating
  • Failed
  • Finished
DestinationOwnerDBName String dtstestdata

The name of the database to which the migration object in the destination instance belongs.

ErrorMessage String DTS-1020042 Execute sql error sql: DTS-1020042 Execute sql error sql: ERROR: column \"id\" named in key does not exist

The error message returned if schema migration failed.

ObjectDefinition String CREATE TABLE `dtstestdata`.`customer` (\n`runoob_id` int(10) unsigned auto_increment COMMENT '' NOT NULL , \n`runoob_title` varchar(100) CHARSET `utf8` COLLATE `utf8_general_ci` COMMENT '' NOT NULL , \n`runoob_author1216` varchar(40) CHARSET `utf8` COLLATE `utf8_general_ci` COMMENT '' NOT NULL , \n`submission_date1216` date COMMENT '' NULL \n, PRIMARY KEY (`runoob_id`)) engine=InnoDB AUTO_INCREMENT=200001 DEFAULT CHARSET=`utf8` DEFAULT COLLATE `utf8_general_ci` ROW_FORMAT= Dynamic comment = '' ;\n

The schema of the migration object.

ObjectName String customer

The name of migration object.

ObjectType String Table

The type of the migration object. Valid values: Table, Constraint, Index, View, Materialize View, Type, Synonym, Trigger, Function, Procedure, Package, Default, Rule, PlanGuide, and Sequence.

SourceOwnerDBName String dtstestdata

The name of the database to which the migration object in the source instance belongs.

Status String Finished

The status of schema migration. Valid values:

  • NotStarted: Schema migration is not started.
  • Migrating: Schema migration is in progress.
  • Failed: Schema migration failed.
  • Finished: Schema migration is completed.
Success String true

Indicates whether the call was successful.

TotalRecordCount Long 1

The total number of entries that are returned.

Examples

Sample requests

http(s)://dts.aliyuncs.com/?Action=DescribeMigrationJobDetail
&MigrationJobId=dtsta7w132u12h****
&<Common request parameters>

Sample success responses

XML format

<DescribeMigrationJobDetailResponse>
      <DataSynchronizationDetailList>
            <DataSynchronizationDetail>
                  <Status>Migrating</Status>
                  <TableName>customer</TableName>
                  <SourceOwnerDBName>dtstestdata</SourceOwnerDBName>
                  <DestinationOwnerDBName>dtstestdata</DestinationOwnerDBName>
            </DataSynchronizationDetail>
      </DataSynchronizationDetailList>
      <RequestId>0AE3CD0B-4148-426F-A90E-952467CC****</RequestId>
      <DataInitializationDetailList>
            <DataInitializationDetail>
                  <Status>Finished</Status>
                  <TableName>customer</TableName>
                  <TotalRowNum>201477</TotalRowNum>
                  <MigrationTime>0.0</MigrationTime>
                  <SourceOwnerDBName>dtstestdata</SourceOwnerDBName>
                  <DestinationOwnerDBName>dtstestdata</DestinationOwnerDBName>
                  <FinishRowNum>200001</FinishRowNum>
            </DataInitializationDetail>
      </DataInitializationDetailList>
      <Success>true</Success>
      <StructureInitializationDetailList>
            <StructureInitializationDetail>
                  <Status>Finished</Status>
                  <ObjectType>Table</ObjectType>
                  <ObjectDefinition>CREATE TABLE `dtstestdata`.`customer` (
`runoob_id`  int(10) unsigned   auto_increment  COMMENT ''   NOT NULL   , 
`runoob_title`  varchar(100)  CHARSET `utf8` COLLATE `utf8_general_ci`    COMMENT ''   NOT NULL   , 
`runoob_author1216`  varchar(40)  CHARSET `utf8` COLLATE `utf8_general_ci`    COMMENT ''   NOT NULL   , 
`submission_date1216`  date     COMMENT ''   NULL   
, PRIMARY KEY (`runoob_id`)) engine=InnoDB AUTO_INCREMENT=200001 DEFAULT CHARSET=`utf8` DEFAULT COLLATE `utf8_general_ci` ROW_FORMAT= Dynamic comment = '' ;
</ObjectDefinition>
                  <SourceOwnerDBName>dtstestdata</SourceOwnerDBName>
                  <DestinationOwnerDBName>dtstestdata</DestinationOwnerDBName>
                  <ObjectName>customer</ObjectName>
            </StructureInitializationDetail>
      </StructureInitializationDetailList>
</DescribeMigrationJobDetailResponse>

JSON format

{
	"DataSynchronizationDetailList": {
		"DataSynchronizationDetail": [
			{
				"Status": "Migrating",
				"TableName": "customer",
				"SourceOwnerDBName": "dtstestdata",
				"DestinationOwnerDBName": "dtstestdata"
			}
		]
	},
	"RequestId": "0AE3CD0B-4148-426F-A90E-952467CC****",
	"DataInitializationDetailList": {
		"DataInitializationDetail": [
			{
				"Status": "Finished",
				"TableName": "customer",
				"TotalRowNum": "201477",
				"MigrationTime": "0.0",
				"SourceOwnerDBName": "dtstestdata",
				"DestinationOwnerDBName": "dtstestdata",
				"FinishRowNum": "200001"
			}
		]
	},
	"Success": true,
	"StructureInitializationDetailList": {
		"StructureInitializationDetail": [
			{
				"Status": "Finished",
				"ObjectType": "Table",
				"ObjectDefinition": "CREATE TABLE `dtstestdata`.`customer` (\n`runoob_id`  int(10) unsigned   auto_increment  COMMENT ''   NOT NULL   , \n`runoob_title`  varchar(100)  CHARSET `utf8` COLLATE `utf8_general_ci`    COMMENT ''   NOT NULL   , \n`runoob_author1216`  varchar(40)  CHARSET `utf8` COLLATE `utf8_general_ci`    COMMENT ''   NOT NULL   , \n`submission_date1216`  date     COMMENT ''   NULL   \n, PRIMARY KEY (`runoob_id`)) engine=InnoDB AUTO_INCREMENT=200001 DEFAULT CHARSET=`utf8` DEFAULT COLLATE `utf8_general_ci` ROW_FORMAT= Dynamic comment = '' ;\n",
				"SourceOwnerDBName": "dtstestdata",
				"DestinationOwnerDBName": "dtstestdata",
				"ObjectName": "customer"
			}
		]
	}
}

Error codes

For a list of error codes, visit the API Error Center.