Uses the specified SQL statement, error message, and database ID to analyze and fix the SQL error.
Operation description
You can call this operation to analyze and fix SQL errors based on the specified SQL statement, error message, and database ID.
Debugging
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:
- For mandatory resource types, indicate with a prefix of * .
- If the permissions cannot be granted at the resource level,
All Resourcesis 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.
| Operation | Access level | Resource type | Condition key | Associated operation |
|---|---|---|---|---|
| dms:FixSqlByMetaAgent | none | *All Resources * |
| none |
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| DbId | string | Yes | The ID of the database. You can call the ListDatabases operation to obtain the ID. | 1*** |
| Query | string | No | The remarks. | |
| Sql | string | Yes | The SQL statement that reports the error. | select * from table where col = 1 |
| Error | string | No | The error message. | unknown column col |
| Model | string | No | The name of the selected model. You can use only Qwen series models. | qwen-plus |
Response parameters
Examples
Sample success responses
JSONformat
{
"RequestId": "0C1CB646-1DE4-4AD0-B4A4-7D47DD52E931",
"ErrorCode": "UnknownError",
"ErrorMessage": "UnknownError",
"Success": true,
"Data": {
"Content": "",
"SessionId": "f63a6eed-0e3c-4564-8533-b1295db8d6ff"
}
}Error codes
For a list of error codes, visit the Service error codes.
