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.
Debugging
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 | 453**** |
The ID of the data change ticket. You can call the ListOrders operation to query the ID of the data change ticket. |
| PageNumber | Long | No | 1 |
The number of the page to return. |
| PageSize | Long | No | 10 |
The number of entries to return on each page. |
| DbId | Long | No | 1930**** |
The ID of the database. The database can be a physical database or a logical database.
|
| Tid | Long | No | 3*** |
The ID of the tenant. You can call the GetUserActiveTenant operation to query the tenant ID. |
| RegionId | String | No | cn-hangzhou |
The ID of the region in which Data Management (DMS) is activated. Set this parameter to the ID of the region that is in proximity to your applications. For more information about the valid values of this parameter, see RegionID parameter. |
Response parameters
| Parameter | Type | Example | Description |
|---|---|---|---|
| RequestId | String | 31853A2B-DC9D-5B39-8492-D2AC8BCF550E |
The ID of the request. |
| Success | Boolean | true |
Indicates whether the request is successful. Valid values:
|
| 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 | CheckSQL": "OPTIMIZE TABLE `Text_TableNames` |
The SQL statement. |
| AffectRows | Long | 0 |
The estimated number of affected rows. |
| DbId | Long | 1930**** |
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 | WAITING |
The review status of the SQL statement. Valid values:
|
| SqlType | String | OPTIMIZE |
The type of the SQL statement, such as DELETE, UPDATE, or ALTER_TABLE. |
| TableNames | String | Text_TableNames |
The name of the table whose data is changed. |
Examples
Sample requests
http(s)://dms-enterprise.aliyuncs.com/?Action=ListDataCorrectPreCheckSQL
&OrderId=453****
&PageNumber=1
&PageSize=10
&DbId=1930****
&Tid=3***
&<Common request parameters>
Sample success responses
XML format
HTTP/1.1 200 OK
Content-Type:application/xml
<ListDataCorrectPreCheckSQLResponse>
<RequestId>31853A2B-DC9D-5B39-8492-D2AC8BCF550E</RequestId>
<PreCheckSQLList>
<CheckSQL>OPTIMIZE TABLE `Text_TableNames`</CheckSQL>
<SqlReviewStatus>WAITING</SqlReviewStatus>
<TableNames>`Text_TableNames`,</TableNames>
<DbId>1930****</DbId>
<SqlType>OPTIMIZE</SqlType>
<AffectRows>0</AffectRows>
</PreCheckSQLList>
<Success>true</Success>
</ListDataCorrectPreCheckSQLResponse>
JSON format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "31853A2B-DC9D-5B39-8492-D2AC8BCF550E",
"PreCheckSQLList" : [ {
"CheckSQL" : "OPTIMIZE TABLE `Text_TableNames`",
"SqlReviewStatus" : "WAITING",
"TableNames" : "`Text_TableNames`,",
"DbId" : "1930****",
"SqlType" : "OPTIMIZE",
"AffectRows" : 0
} ],
"Success" : true
}
Error codes
For a list of error codes, visit the API Error Center.