Queries the status of a data synchronization instance.

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 DescribeSynchronizationJobStatus

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

SynchronizationJobId String Yes dtsexjk1alb116****

The ID of the data synchronization instance. You can call the DescribeSynchronizationJobs operation to query the instance ID.

RegionId String No cn-hangzhou

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

SynchronizationDirection String No Forward

The synchronization direction. Valid values:

  • Forward
  • Reverse
Note Default value: Forward.

The value Reverse takes effect only if the topology of the data synchronization instance is two-way synchronization.

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
Checkpoint String 1610616144

The UNIX timestamp generated when the latest data record was synchronized.

Note You can use a search engine to obtain a UNIX timestamp converter.
DataInitialization String true

Indicates whether full data synchronization is performed. Valid values:

  • true: yes
  • false: no
DataInitializationStatus Struct

The status of full data synchronization.

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

The error message returned if full data synchronization failed.

Percent String 100

The progress of full data synchronization. Unit: %.

Progress String 200001

The number of records that have been synchronized during full data synchronization.

Status String Finished

The status of full data synchronization. Valid values:

  • NotStarted: Full data synchronization is not started.
  • Migrating: Full data synchronization is in progress.
  • Failed: Full data synchronization failed.
  • Finished: Full data synchronization is completed.
DataSynchronizationStatus Struct

The status of incremental data synchronization.

Checkpoint String 1610709865

The UNIX timestamp generated when the latest data record was synchronized.

Delay String 0

The synchronization latency, in seconds.

DelayMillis Long 856

The synchronization latency, in milliseconds.

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

The error message returned if incremental data synchronization failed.

Percent String 100

The progress of incremental data synchronization. Unit: %.

Status String Finished

The status of incremental data synchronization. Valid values:

  • NotStarted: Incremental data synchronization is not started.
  • Migrating: Incremental data synchronization is in progress.
  • Failed: Incremental data synchronization failed.
  • Finished: Incremental data synchronization is completed.
Delay String 0

The synchronization latency, in seconds.

DelayMillis Long 506

The synchronization delay, in milliseconds.

DestinationEndpoint Struct

The connection settings of the destination instance.

EngineName String MySQL

The database type of the destination instance.

IP String 172.16.88.***

The endpoint of the destination instance.

InstanceId String rm-bp162d4tp0500****

The ID of the destination instance.

InstanceType String RDS

The type of the destination instance.

Port String 3306

The database service port of the destination instance.

UserName String dtstest

The database account of the destination instance.

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.

ErrorMessage String DTS-070211: Connect Source DB failed. cause by [com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException:Could not create connection to database server. Attempted reconnect 3 times. Giving up.][com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:Communications link failure\n\nThe last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.][java.net.ConnectException:Connection timed out (Connection timed out)] About more information in [https://yq.aliyun.com/articles/499178].

The error message returned if data synchronization failed.

ExpireTime String 2021-03-07T16:00:00Z

The time when the data synchronization instance expires. The time is displayed in the yyyy-MM-ddTHH:mm:ssZ format in UTC.

Note This parameter is returned only if the return value of the PayType parameter is PrePaid.
PayType String PrePaid

The billing method of the data synchronization instance. Valid values:

  • PrePaid: subscription
  • PostPaid: pay-as-you-go
Performance Struct

The performance of the data synchronization instance.

FLOW String 1

The data traffic that is synchronized per second. Unit: MB/s.

RPS String 100

The number of times SQL statements are synchronized per second, including BEGIN, COMMIT, DML, and DDL statements. DML statements include INSERT, DELETE, and UPDATE.

PrecheckStatus Struct

The precheck status.

Detail Array of CheckItem

The result of each precheck item.

CheckStatus String Success

The precheck result. Valid values:

  • Success: The task passed the precheck.
  • Failed: The task failed to pass the precheck.
ErrorMessage String Original error: Access denied for user 'dtstest'@'100.104.***.**' (using password: YES)

The error message returned if the task failed to pass the precheck.

Note This parameter is returned only if the return value of the CheckStatus parameter is Failed.
ItemName String CHECK_CONN_SRC

The name of the precheck item.

RepairMethod String CHECK_ERROR_DEST_CONN_REPAIR2

The method to fix the precheck failure.

Note This parameter is returned only if the return value of the CheckStatus parameter is Failed.
Percent String 100

The precheck progress. Unit: %.

Status String Success

The precheck result. Valid values:

  • Success: The task passed the precheck.
  • Failed: The task failed to pass the precheck.
RequestId String DACDF659-AFC6-4DC8-ADB8-4569419A4****

The ID of the request.

SourceEndpoint Struct

The connection settings of the source instance.

EngineName String MySQL

The database type of the source instance.

IP String 172.16.88.***

The endpoint of the source instance.

InstanceId String rm-bp1i99e8l7913****

The ID of the source instance.

InstanceType String RDS

The type of the source instance.

Port String 3306

The database service port of the source instance.

UserName String dtstest

The database account of the source instance.

Status String Synchronizing

The status of the data synchronization task. Valid values:

  • NotStarted: The task is not started.
  • Prechecking: The task is being prechecked.
  • PrecheckFailed: The task failed to pass the precheck.
  • Initializing: The task is performing initial synchronization.
  • InitializeFailed: Initial synchronization failed.
  • Synchronizing: The task is synchronizing data.
  • Failed: The task failed to synchronize data.
  • Suspending: The task is paused.
  • Modifying: The objects in the task are being modified.
  • Finished: The task is completed.
StructureInitialization String true

Indicates whether schema synchronization is performed. Valid values:

  • true: yes
  • false: no
StructureInitializationStatus Struct

The status of schema synchronization.

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

The error message returned if schema synchronization failed.

Percent String 100

The progress of schema synchronization. Unit: %.

Progress String 1

The number of tables whose schemas have been synchronized.

Status String Finished

The status of schema synchronization. Valid values:

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

Indicates whether the call was successful.

SynchronizationDirection String Forward

The synchronization direction. Valid values:

  • Forward
  • Reverse
SynchronizationJobClass String large

The specification of the data synchronization instance.

SynchronizationJobName String MySQL Synchronization

The name of the data synchronization task.

SynchronizationJobId String dtsexjk1alb116****

The ID of the data synchronization instance.

SynchronizationObjects Array of SynchronizationObject

The objects that are synchronized by the task.

NewSchemaName String newdtstestdatabase

The database name that is used in the destination instance.

SchemaName String dtstestdatabase

The name of the synchronized database.

TableExcludes Array of TableExclude

The source tables that are excluded from the data synchronization task.

TableName String order

The name of the excluded table.

TableIncludes Array of TableInclude

The tables that are synchronized by the task.

TableName String customer

The name of the synchronized table.

TaskId String exjk1alb116****

The ID of the data synchronization task. You can use the task ID to configure the link to the task details page in the DTS console.

Note The link to the task details page is https://dts.console.aliyun.com/#/syncmore/exjk1alb116/config/.

Examples

Sample requests

http(s)://dts.aliyuncs.com/?Action=DescribeSynchronizationJobStatus
&SynchronizationJobId=dtsexjk1alb116****
&<Common request parameters>

Sample success responses

XML format

<DescribeSynchronizationJobStatusResponse>
      <TaskId>exjk1alb116****</TaskId>
      <SynchronizationObjects>
            <SchemaName>newdtstestdatabase</SchemaName>
            <NewSchemaName>dtstestdatabase</NewSchemaName>
      </SynchronizationObjects>
      <DataInitializationStatus>
            <Status>Finished</Status>
            <Progress>200001</Progress>
            <Percent>100</Percent>
      </DataInitializationStatus>
      <Delay>0</Delay>
      <Success>true</Success>
      <DelayMillis>0</DelayMillis>
      <DataInitialization>true</DataInitialization>
      <SynchronizationJobClass>large</SynchronizationJobClass>
      <Status>synchronizing</Status>
      <RequestId>DACDF659-AFC6-4DC8-ADB8-4569419A****</RequestId>
      <SynchronizationJobName>MySQL Synchronization</SynchronizationJobName>
      <PayType>PostPaid</PayType>
      <ErrMessage></ErrMessage>
      <PrecheckStatus>
            <Status>Finished</Status>
            <Percent>100</Percent>
            <Detail>
                  <CheckStatus>Success</CheckStatus>
                  <ItemName>CHECK_CONN_SRC</ItemName>
            </Detail>
            <Detail>
                  <CheckStatus>Success</CheckStatus>
                  <ItemName>CHECK_AUTH_SRC</ItemName>
            </Detail>
            <Detail>
                  <CheckStatus>Success</CheckStatus>
                  <ItemName>CHECK_CONN_DEST</ItemName>
            </Detail>
            <Detail>
                  <CheckStatus>Success</CheckStatus>
                  <ItemName>CHECK_AUTH_DEST</ItemName>
            </Detail>
            <Detail>
                  <CheckStatus>Success</CheckStatus>
                  <ItemName>CHECK_BINLOG_ON</ItemName>
            </Detail>
            <Detail>
                  <CheckStatus>Success</CheckStatus>
                  <ItemName>CHECK_BINLOG_MODE</ItemName>
            </Detail>
            <Detail>
                  <CheckStatus>Success</CheckStatus>
                  <ItemName>CHECK_BINLOG_ROW_IMAGE</ItemName>
            </Detail>
            <Detail>
                  <CheckStatus>Success</CheckStatus>
                  <ItemName>CHECK_SERVER_ID</ItemName>
            </Detail>
            <Detail>
                  <CheckStatus>Success</CheckStatus>
                  <ItemName>CHECK_BINLOG_EXIST</ItemName>
            </Detail>
            <Detail>
                  <CheckStatus>Success</CheckStatus>
                  <ItemName>CHECK_ENGINE</ItemName>
            </Detail>
            <Detail>
                  <CheckStatus>Success</CheckStatus>
                  <ItemName>CHECK_MYSQL_PASSOWRD_FORMAT</ItemName>
            </Detail>
            <Detail>
                  <CheckStatus>Success</CheckStatus>
                  <ItemName>CHECK_SRC</ItemName>
            </Detail>
            <Detail>
                  <CheckStatus>Success</CheckStatus>
                  <ItemName>CHECK_SAME_OBJ</ItemName>
            </Detail>
            <Detail>
                  <CheckStatus>Success</CheckStatus>
                  <ItemName>CHECK_SQL_MODE</ItemName>
            </Detail>
            <Detail>
                  <CheckStatus>Success</CheckStatus>
                  <ItemName>CHECK_SAME_USER</ItemName>
            </Detail>
            <Detail>
                  <CheckStatus>Success</CheckStatus>
                  <ItemName>CHECK_TOPOLOGY</ItemName>
            </Detail>
      </PrecheckStatus>
      <Checkpoint>1610616144</Checkpoint>
      <SynchronizationJobId>dtsexjk1alb116****</SynchronizationJobId>
      <DestinationEndpoint>
            <InstanceId>rm-bp1u40w1ip917****</InstanceId>
            <InstanceType>RDS</InstanceType>
            <EngineName>MySQL</EngineName>
      </DestinationEndpoint>
      <SourceEndpoint>
            <InstanceId>rm-bp1i99e8l7913****</InstanceId>
            <InstanceType>RDS</InstanceType>
            <EngineName>MySQL</EngineName>
      </SourceEndpoint>
      <StructureInitialization>true</StructureInitialization>
      <Performance>
            <RPS>0</RPS>
            <FLOW>0.00MB/s</FLOW>
      </Performance>
      <StructureInitializationStatus>
            <Status>Finished</Status>
            <Progress>1</Progress>
            <Percent>100</Percent>
      </StructureInitializationStatus>
</DescribeSynchronizationJobStatusResponse>

JSON format

{
    "TaskId": "exjk1alb116****",
    "SynchronizationObjects": [
        {
            "TableIncludes": [],
            "TableExcludes": [],
            "SchemaName": "newdtstestdatabase",
            "NewSchemaName": "dtstestdatabase"
        }
    ],
    "DataInitializationStatus": {
        "Status": "Finished",
        "Progress": "200001",
        "Percent": "100"
    },
    "Delay": "0",
    "Success": true,
    "DelayMillis": 0,
    "DataInitialization": true,
    "SynchronizationJobClass": "large",
    "Status": "synchronizing",
    "RequestId": "DACDF659-AFC6-4DC8-ADB8-4569419A****",
    "SynchronizationJobName": "MySQL Synchronization",
    "PayType": "PostPaid",
    "ErrMessage": "",
    "PrecheckStatus": {
        "Status": "Finished",
        "Percent": "100",
        "Detail": [
            {
                "CheckStatus": "Success",
                "ItemName": "CHECK_CONN_SRC"
            },
            {
                "CheckStatus": "Success",
                "ItemName": "CHECK_AUTH_SRC"
            },
            {
                "CheckStatus": "Success",
                "ItemName": "CHECK_CONN_DEST"
            },
            {
                "CheckStatus": "Success",
                "ItemName": "CHECK_AUTH_DEST"
            },
            {
                "CheckStatus": "Success",
                "ItemName": "CHECK_BINLOG_ON"
            },
            {
                "CheckStatus": "Success",
                "ItemName": "CHECK_BINLOG_MODE"
            },
            {
                "CheckStatus": "Success",
                "ItemName": "CHECK_BINLOG_ROW_IMAGE"
            },
            {
                "CheckStatus": "Success",
                "ItemName": "CHECK_SERVER_ID"
            },
            {
                "CheckStatus": "Success",
                "ItemName": "CHECK_BINLOG_EXIST"
            },
            {
                "CheckStatus": "Success",
                "ItemName": "CHECK_ENGINE"
            },
            {
                "CheckStatus": "Success",
                "ItemName": "CHECK_MYSQL_PASSOWRD_FORMAT"
            },
            {
                "CheckStatus": "Success",
                "ItemName": "CHECK_SRC"
            },
            {
                "CheckStatus": "Success",
                "ItemName": "CHECK_SAME_OBJ"
            },
            {
                "CheckStatus": "Success",
                "ItemName": "CHECK_SQL_MODE"
            },
            {
                "CheckStatus": "Success",
                "ItemName": "CHECK_SAME_USER"
            },
            {
                "CheckStatus": "Success",
                "ItemName": "CHECK_TOPOLOGY"
            }
        ]
    },
    "Checkpoint": "1610616144",
    "SynchronizationJobId": "dtsexjk1alb116****",
    "DestinationEndpoint": {
        "InstanceId": "rm-bp1u40w1ip917****",
        "InstanceType": "RDS",
        "EngineName": "MySQL"
    },
    "SourceEndpoint": {
        "InstanceId": "rm-bp1i99e8l7913****",
        "InstanceType": "RDS",
        "EngineName": "MySQL"
    },
    "StructureInitialization": true,
    "Performance": {
        "RPS": "0",
        "FLOW": "0.00MB/s"
    },
    "StructureInitializationStatus": {
        "Status": "Finished",
        "Progress": "1",
        "Percent": "100"
    }
}

Error codes

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