Call the GetSQLReviewCheckResultStatus to obtain the audit results of SQL audit tickets.
For more instructions on this feature, see SQL audit .
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | GetSQLReviewCheckResultStatus |
The system specifies the parameters. Valid values: GetSQLReviewCheckResultStatus . |
OrderId | Long | Yes | 123321 |
ticket number, you can call CreateSQLReviewOrder The interface obtains the parameter. |
Tid | Long | No | 1 |
The tenant ID, you can call GetUserActiveTenant or ListUserTenants The interface obtains the parameter. |
RegionId | String | No | cn-hangzhou |
Select the service region of DMS to call the interface. For the value, see RegionID parameter description . Note Set this parameter to the ID of the region that is close to your services.
|
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 0C1CB646-1DE4-4AD0-B4A4-7D47DD52E931 |
Id of the request |
ErrorCode | String | UnknownError |
The error code returned. |
ErrorMessage | String | UnknownError |
The error message that is returned. |
Success | Boolean | true |
Indicates whether the request is successful. |
CheckResultStatus | Object |
SQL audit results. |
|
TotalSQLCount | Long | 10 |
The total number of SQL statements. Unit: bars. |
CheckedCount | Long | 10 |
The number of audited SQL statements. Unit: bars. |
CheckStatusResult | Object |
The detection status. |
|
New | Long | 0 |
The number of SQL statements awaiting review. Unit: bars. |
Unknown | Long | 0 |
The number of SQL statements that parse exceptions. Unit: bars. |
CheckNotPass | Long | 1 |
The number of SQL statements that failed the detection. Unit: bars. |
CheckPass | Long | 8 |
detection of SQL number, unit: article. |
ForcePass | Long | 1 |
The number of manually passed SQL statements. Unit: bars. |
ForceNotPass | Long | 0 |
The number of failed SQL statements. Unit: bars. |
SQLReviewResult | Object |
SQL audit optimization suggestions. |
|
MustImprove | Long | 1 |
The number of SQL that must be improved. Unit: bar. |
PotentialIssue | Long | 0 |
The number of SQL statements with potential problems. Unit: bars. |
SuggestImprove | Long | 3 |
The number of SQL recommendations for improvement. Unit: bar. |
UseDmsToolkit | Long | 0 |
It is recommended to use the number of SQL changes without lock structure, unit: bar. |
UseDmsDmlUnlock | Long | 0 |
We recommend that you use the number of SQL statements to change without lock data. Unit: bar. |
TableIndexSuggest | Long | 2 |
The number of SQL recommended by the index. Unit: bars. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=GetSQLReviewCheckResultStatus &OrderId=123321 &Tid=1&Public request parameters
Sample success responses
XML
format
HTTP/1.1 200 OK Content-Type:application/xml <GetSQLReviewCheckResultStatusResponse> <RequestId>E1ABE358-14A0-4DFA-9776-1A3CB59192DF</RequestId> <CheckResultStatus> <SQLReviewResult> <TableIndexSuggest>1</TableIndexSuggest> <MustImprove>1</MustImprove> <SuggestImprove>1</SuggestImprove> <PotentialIssue>2</PotentialIssue> </SQLReviewResult> <TotalSQLCount>4</TotalSQLCount> <CheckedCount>4</CheckedCount> <CheckStatusResult> <CheckNotPass>1</CheckNotPass> <CheckPass>3</CheckPass> </CheckStatusResult> </CheckResultStatus> <Success>true</Success> </GetSQLReviewCheckResultStatusResponse>
JSON
format
HTTP/1.1 200 OK Content-Type:application/json { "RequestId" : "E1ABE358-14A0-4DFA-9776-1A3CB59192DF", "CheckResultStatus" : { "SQLReviewResult" : { "TableIndexSuggest" : 1, "MustImprove" : 1, "SuggestImprove" : 1, "PotentialIssue" : 2 }, "TotalSQLCount" : 4, "CheckedCount" : 4, "CheckStatusResult" : { "CheckNotPass" : 1, "CheckPass" : 3 } }, "Success" : true }
Error code
Go to the Error Center View more error codes.