All Products
Search
Document Center

Data Management:FixSqlByMetaAgent

Last Updated:Jan 13, 2026

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

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:
    • For mandatory resource types, indicate with a prefix of * .
    • 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:FixSqlByMetaAgentnone
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
DbIdstringYes

The ID of the database. You can call the ListDatabases operation to obtain the ID.

1***
QuerystringNo

The remarks.

SqlstringYes

The SQL statement that reports the error.

select * from table where col = 1
ErrorstringNo

The error message.

unknown column col
ModelstringNo

The name of the selected model. You can use only Qwen series models.

qwen-plus

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

Id of the request

0C1CB646-1DE4-4AD0-B4A4-7D47DD52E931
ErrorCodestring

The error code that is returned if the request failed.

UnknownError
ErrorMessagestring

The error message that is returned if the request failed.

UnknownError
Successboolean

Indicates whether the request was successful. Valid values:

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

The data returned.

Contentstring

The answer.

SessionIdstring

The session ID.

f63a6eed-0e3c-4564-8533-b1295db8d6ff

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.