Queries the precheck information about an SQL statement that is specified in a data change ticket.

For more information about the Normal Data Modify feature, see Change regular data.


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 ListDataCorrectPreCheckSQL

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

OrderId Long Yes 12****

The ID of the ticket for the data change.

PageNumber Long No 1

The number of the page to return.

Valid values: an integer that is greater than 0.

Default value: 1.

PageSize Long No 10

The number of entries to return on each page.

DbId Long No 11****

The ID of the database.

Tid Long No 1

The ID of the tenant. You can call the GetUserActiveTenant or ListUserTenants operation to query the ID of the tenant.

RegionId String No cn-hangzhou

The ID of the region where DMS is activated. For more information about the valid values of the parameter, see RegionID parameter.

Note Set this parameter to the ID of the region that is close to your service.

Response parameters

Parameter Type Example Description
RequestId String 4B2520C9-3005-4CCA-9C9B-944254ABEB0B

The ID of the request.

Success Boolean true

Indicates whether the request is successful.

ErrorMessage String UnknownError

The error message returned.

ErrorCode String UnknownError

The error code returned.

PreCheckSQLList Array of PreCheckSQL

The precheck information about SQL statements.

CheckSQL String CREATE TABLE t1 ...

The SQL statement.

AffectRows Long 0

The estimated number of affected rows.

DbId Long 431253

The ID of the database.

SQLReviewQueryKey String b9e771fc6ec247dea6d06a32c777****

The key that is used to query the details of optimization suggestions. You can call the GetSQLReviewOptimizeDetail operation to query the details of optimization suggestions based on the key.

SqlReviewStatus String PASS

The review status of the SQL statement. Valid values:

  • WAITING: The SQL statement is pending for review.
  • RUNNING: The SQL statement is being reviewed.
  • IGNORE: The SQL statement review is skipped.
  • PASS: The SQL statement passed the review.
  • BLOCK: The SQL statement failed the review.

The type of the SQL statement.


Sample requests

&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK

        <CheckSQL>CREATE TABLE IF NOT EXISTS `task_data_2020-10` LIKE task_data</CheckSQL>

JSON format

HTTP/1.1 200 OK

  "RequestId" : "B02A7F37-96D2-4712-9196-4A5C94174A75",
  "PreCheckSQLList" : [ {
    "CheckSQL" : "CREATE TABLE IF NOT EXISTS `task_data_2020-10` LIKE task_data",
    "SqlReviewStatus" : "PASS",
    "DbId" : 8050000,
    "SqlType" : "CREATE_TABLE",
    "AffectRows" : 0,
    "SQLReviewQueryKey" : "4eb7635609c54ced8c584e926aa7****"
  } ],
  "Success" : true

Error codes

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