This topic describes how to call the DescribeSynchronizationJobStatus operation to query the status of a data synchronization job.
Test
Request parameters
|
Name |
Type |
Required |
Example |
Description |
| Action | String | Yes | DescribeSynchronizationJobStatus | The required parameter. Set the value to DescribeSynchronizationJobStatus. |
| RegionId | String | No | cn-hangzhou | The ID of the region where the data synchronization instance resides. For more information, see Supported regions. |
| SynchronizationJobId | String | Yes | dtsexjk1alb116**** | The ID of the data synchronization job. You can call the DescribeSynchronizationJobs operation to query the job ID. |
| SynchronizationDirection | String | No | Forward | The synchronization direction. Valid values:
Note The default value is Forward. The value Reverse takes effect only if the topology of the data synchronization job is two-way synchronization. |
| ClientToken | String | No | 0c593ea1-3bea-11e9-b96b-88e9fe63**** | A client token that is used to ensure the idempotence of the request. Generate a parameter value from your client to make sure that the value is unique among different requests. The ClientToken parameter 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 set this parameter because this parameter will be deprecated. |
| ResourceGroupId | String | No | rg-acfmzawhxxc**** | The ID of the resource group. |
Response parameters
Name |
Type |
Example |
Description |
| SynchronizationJobName | String | MySQL synchronization | The name of the data synchronization job. |
| Status | String | synchronizing | The status of the data synchronization job. Valid values:
|
| DataInitialization | String | true | Indicates whether initial full data synchronization is performed. Valid values:
|
| Delay | String | 0 | The synchronization latency in seconds. |
| 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 fails. |
| ExpireTime | String | 2021-03-07T16:00:00Z | The expiration time of the data synchronization job. The time is in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC. Note This parameter is returned only if the return value of the PayType parameter is PrePaid. |
| ErrCode | String | InternalError | The error code returned if the call fails. |
| Success | String | true | Indicates whether the request was successful. |
| StructureInitialization | String | true | Indicates whether initial schema synchronization is performed. Valid values:
|
| PayType | String | PrePaid | The billing method of the data synchronization job. Valid values:
|
| ErrMessage | String | The request processing has failed due to some unknown error. | The error message returned if the call fails. |
| SynchronizationJobClass | String | large | The specification of the data synchronization job. |
| RequestId | String | DACDF659-AFC6-4DC8-ADB8-4569419A4**** | The ID of the request. |
| SynchronizationJobId | String | dtsexjk1alb116**** | The ID of the data synchronization job. |
| DelayMillis | Long | 506 | The synchronization latency in milliseconds. |
| SynchronizationDirection | String | Forward | The synchronization direction. Valid values:
|
| TaskId | String | exjk1alb116**** | The ID of the data synchronization task. |
| Checkpoint | String | 1610616144 | The timestamp of the latest synchronized data record. This is a UNIX timestamp. Note You can use a search engine to find a UNIX timestamp converter. |
| DataInitializationStatus | Object | The status of initial full data synchronization. |
|
| Status | String | Finished | The status of initial full data synchronization. Valid values:
|
| Percent | String | 100 | The progress of initial full data synchronization in percentage. |
| ErrorMessage | String | java.lang.NumberFormatException: For input string: "" | The error message returned if initial full data synchronization fails. |
| Progress | String | 200001 | The number of records that have been synchronized during initial full data synchronization. |
| DataSynchronizationStatus | Object | The status of incremental data synchronization. |
|
| Status | String | Finished | The status of incremental data synchronization. Valid values:
|
| Delay | String | 0 | The latency of incremental data synchronization in seconds. |
| Percent | String | 100 | The progress of incremental data synchronization in percentage. |
| ErrorMessage | String | The task has failed for too long and cannot be recovered. | The error message returned if incremental data synchronization fails. |
| DelayMillis | Long | 856 | The latency of incremental data synchronization in milliseconds. |
| Checkpoint | String | 1610709865 | The timestamp of the latest synchronized data record. This is a UNIX timestamp. |
| DestinationEndpoint | Object | The connection settings of the destination instance. |
|
| InstanceId | String | rm-bp162d4tp0500**** | The ID of the destination instance. |
| IP | String | 172.16.88.*** | The endpoint of the destination instance. |
| InstanceType | String | RDS | The type of the destination instance. |
| Port | String | 3306 | The service port of the destination database. |
| UserName | String | dtstest | The database account of the destination instance. |
| EngineName | String | MySQL | The database type of the destination instance. |
| Performance | Object | Synchronization link overview. |
|
| RPS | String | 100 | The number of SQL statements that are synchronized per second. This includes BEGIN, COMMIT, Data Manipulation Language (DML), and Data Definition Language (DDL) statements. |
| FLOW | String | 1 | The data traffic synchronized per second, in MB/s. |
| PrecheckStatus | Object | The precheck status. |
|
| Status | String | Success | The precheck result. Valid values:
|
| Percent | String | 100 | The overall progress of the precheck in percentage. |
| Detail | Array of CheckItem | The details of each precheck item. |
|
| CheckStatus | String | Success | The check result. Valid values:
|
| ErrorMessage | String | Original error: Access denied for user 'dtstest'@'100.104.***.**' (using password: YES) | The error message returned if the precheck fails. Note This parameter is returned only if the return value of the CheckStatus parameter is Failed. |
| ItemName | String | CHECK_CONN_SRC | The precheck item. |
| RepairMethod | String | CHECK_ERROR_DEST_CONN_REPAIR2 | The method to fix a precheck failure. Note This parameter is returned only if the return value of the CheckStatus parameter is Failed. |
| SourceEndpoint | Object | The connection settings of the source instance. |
|
| InstanceId | String | rm-bp1i99e8l7913**** | The ID of the source instance. |
| IP | String | 172.16.88.*** | The endpoint of the source instance. |
| InstanceType | String | RDS | The type of the source instance. |
| Port | String | 3306 | The service port of the source database. |
| UserName | String | dtstest | The database account of the source instance. |
| EngineName | String | MySQL | The database type of the source instance. |
| StructureInitializationStatus | Object | The status of initial schema synchronization. |
|
| Status | String | Finished | The status of initial schema synchronization. Valid values:
|
| Percent | String | 100 | The progress of initial schema synchronization in percentage. |
| ErrorMessage | String | DTS-1020042 Execute sql error sql: ERROR: type "geometry" does not exist; | The error message returned if an exception occurs during initial schema synchronization. |
| Progress | String | 1 | The number of tables whose schemas have been synchronized. |
| SynchronizationObjects | Array of SynchronizationObject | The synchronization objects. |
|
| NewSchemaName | String | newdtstestdatabase | The name of the database to be synchronized that is mapped to the destination database. |
| SchemaName | String | dtstestdatabase | The name of the database to be synchronized. |
| TableExcludes | Array of TableExclude | The tables that are excluded from the synchronization task in the database. These tables are not synchronized. |
|
| TableName | String | order | The name of the excluded table. |
| TableIncludes | Array of TableInclude | The tables to be synchronized. |
|
| TableName | String | customer | The name of the table to be synchronized. |
Examples
Sample request
http(s)://dts.aliyuncs.com/?Action=DescribeSynchronizationJobStatus
&SynchronizationJobId=dtsexjk1alb116****
&<Common request parameters>
Sample success response
XML format
HTTP/1.1 200 OK
Content-Type:application/xml
<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/>
<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
HTTP/1.1 200 OK
Content-Type:application/json
{
"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
|
HTTP status code |
Error code |
Error message |
Description |
| 400 | Throttling.User | Request was denied due to user flow control. | The request was rejected because the request frequency reached the threshold. Try again later. |
| 403 | InvalidSecurityToken.Expired | Specified SecurityToken is expired. | The specified security token has expired. Update the signature. |
| 500 | ServiceUnavailable | The request has failed due to a temporary failure of the server. | The request failed because the server timed out or was unavailable. Try again. If the request fails again, contact technical support. |
For a list of error codes, see the Error Center.