All Products
Search
Document Center

Data Management:GetOnlineDDLProgress

Last Updated:Nov 28, 2024

Queries the details and progress of an OnlineDDL task.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
dms:GetOnlineDDLProgressget
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
TidlongNo

The ID of the tenant.

Note To view the ID of the tenant, go to the Data Management (DMS) console and move the pointer over the profile picture in the upper-right corner. For more information, see the "View information about the current tenant" section of the Manage DMS tenants topic.
3***
JobDetailIdlongYes

The ID of the OnlineDDL SQL task details. You can call the ListDBTaskSQLJobDetail operation to obtain the task detail ID.

15***

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

The ID of the request.

34E01EDD-6A16-4CF0-9541-C644D1BE01AA
Successboolean

Indicates whether the request was successful. Valid values:

  • true: The request was successful.
  • false: The request failed.
true
ErrorMessagestring

The error message returned if the request failed.

UnknownError
ErrorCodestring

The error code returned if the request failed.

403
OnlineDDLTaskDetailobject

The details of the task.

JobStatusstring

The state of the task. Valid values:

  • INIT: The task is being initialized.
  • SUCCESS: The task is complete.
  • RUNNING: The task is being executed.
  • WAITING_CUTOVER: The task is waiting for cut-over.
  • RESTARTING: The task is restarting.
  • PAUSE: The task is suspended.
  • UNSUPPORTED: The task is not supported.
  • CANCELED: The task is canceled.
  • FAIL: The task failed.
  • INTERRUPT: The task is interrupted.
SUCCESS
StatusDescstring

The description of the task status.

Success
DelaySecondslong

The replay latency of DMS. Unit: seconds. The replay latency is the period of time that is taken to replay the binary logs of the table to the temporary table. The latency does not indicate the data migration latency between a primary database and a secondary database.

0
CopyTotallong

The estimated total number of rows of the data. The value is obtained from the statistical data in the information_schema database. In most cases, the estimated total number of rows is smaller than the actual number of rows in a table.

10
CopyCountlong

The actual amount of data replicated from the original table in the lock-free change operation.

9
ProgressRatiostring

The estimated execution progress. The actual progress is subject to the task status.

90%
CutoverLockTimeSecondslong

The maximum period of time that a table can be locked during cut-over. Unit: seconds.

2
CutoverFailRetryTimeslong

The number of retries when the cut-over fails.

3
CleanStrategystring

The cleanup policy of the original table after the cut-over. Valid values:

  • DROP: Invalid original tables are deleted.
  • MOVE: Invalid original tables are moved to the test database. You can delete the tables manually.
  • NOTHING: Invalid original tables are retained in the original database. You can delete the tables manually.
DROP
CopyChunkSizelong

The size of each chunk that is used to replicate data. This parameter is used to specify the size of each chunk. A larger chunk size increases the replication efficiency and decreases the business performance.

Note During full replication, the original table is divided into N small chunks and each chunk is replicated to the temporary table one by one. By default, DMS dynamically adjusts the size of each chunk.
1000
CopyChunkModestring

The policy of full replication. Valid values:

  • AUTO: DMS dynamically adjusts the chunk size based on the performance of the database. Tables are locked for less than 1.5 seconds during a single replication operation.
  • RUNNING: DMS uses the specified value of the CopyChunkSize parameter. The valid value of the CopyChunkSize parameter ranges from 1 to 60000. If you set this parameter to RUNNING, you must specify the CopyChunkSize parameter.
AUTO
CutoverWindowStartTimestring

The beginning of the time window of the cut-over operation. Default value: 00:00:00. This parameter controls the time window of the cut-over. Cut-over can be performed only when the cut-over conditions are met and the time is within the specified time window. If the time is not within the time window, the cut-over operation is not performed until the time reaches the beginning of the time window.

12:00:00
CutoverWindowEndTimestring

The end of the time window of the cut-over operation. This value is at least 30 minutes later than the CutoverWindowStartTime parameter. Default value: 23:59:59

13:00:00

Examples

Sample success responses

JSONformat

{
  "RequestId": "34E01EDD-6A16-4CF0-9541-C644D1BE01AA",
  "Success": true,
  "ErrorMessage": "UnknownError",
  "ErrorCode": "403",
  "OnlineDDLTaskDetail": {
    "JobStatus": "SUCCESS",
    "StatusDesc": "Success",
    "DelaySeconds": 0,
    "CopyTotal": 10,
    "CopyCount": 9,
    "ProgressRatio": "90%",
    "CutoverLockTimeSeconds": 2,
    "CutoverFailRetryTimes": 3,
    "CleanStrategy": "DROP",
    "CopyChunkSize": 1000,
    "CopyChunkMode": "AUTO",
    "CutoverWindowStartTime": "12:00:00",
    "CutoverWindowEndTime": "13:00:00"
  }
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history