Queries the details of an SQL task.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | ListDBTaskSQLJobDetail |
The operation that you want to perform. Set the value to ListDBTaskSQLJobDetail. |
JobId | Long | Yes | 1276**** |
The ID of the SQL task. You can call the ListDBTaskSQLJob operation to query the SQL task ID. |
PageNumber | Long | No | 1 |
The number of the page to return. |
PageSize | Long | No | 20 |
The number of entries to return on each page. |
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 | 3F044E33-FE09-58F1-8C61-A0F612EC**** |
The ID of the request. |
Success | Boolean | true |
Indicates whether the request is successful. Valid values:
|
ErrorMessage | String | JobId is mandatory for this action. |
The error message that is returned. |
ErrorCode | String | MissingJobId |
The error code that is returned. |
DBTaskSQLJobDetailList | Array of DBTaskSQLJobDetail |
The details of SQL tasks. |
|
JobDetailId | Long | 24723**** |
The ID of the details of the SQL task. |
CurrentSql | String | update a set id = 1 where id = 1; |
The SQL statement that was executed in the SQL task. |
ExecuteCount | Long | 1 |
The number of times that the SQL statement was executed. |
JobId | Long | 1276**** |
The ID of the SQL task. |
DbId | Long | 1988**** |
The ID of the physical database. |
Logic | Boolean | false |
Indicates whether the database is a logical database. Valid values:
|
Skip | Boolean | false |
Indicates whether the SQL statement was skipped. Valid values:
|
SqlType | String | CREATE_TABLE |
The type of the SQL statement, such as DELETE, UPDATE, or ALTER_TABLE. |
Status | String | SUCCESS |
The status of the SQL task. Valid values:
|
Log | String | log_info |
The details of the operational log. |
StartTime | String | 2021-12-16 00:00:00 |
The point in time when the SQL task started. |
EndTime | String | 2021-12-16 00:00:01 |
The point in time when the SQL task ended. |
TimeDelay | Long | 38 |
The duration of the SQL task. Unit: milliseconds. |
AffectRows | Long | 0 |
The number of rows affected by the SQL task. |
TotalCount | Long | 1 |
The total number of SQL tasks. |
Examples
Sample requests
http(s)://dms-enterprise.aliyuncs.com/?Action=ListDBTaskSQLJobDetail
&JobId=1276****
&PageNumber=1
&PageSize=20
&Tid=3***
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<ListDBTaskSQLJobDetailResponse>
<RequestId>3F044E33-FE09-58F1-8C61-A0F612EC****</RequestId>
<Success>true</Success>
<ErrorMessage>JobId is mandatory for this action.</ErrorMessage>
<ErrorCode>MissingJobId</ErrorCode>
<DBTaskSQLJobDetailList>
<CurrentSql>update a set id = 1 where id = 1;</CurrentSql>
<ExecuteCount>1</ExecuteCount>
<Logic>false</Logic>
<Skip>false</Skip>
<SqlType>CREATE_TABLE</SqlType>
<Status>SUCCESS</Status>
<Log>log_info</Log>
<StartTime>2021-12-16 00:00:00</StartTime>
<EndTime>2021-12-16 00:00:01</EndTime>
<TimeDelay>38</TimeDelay>
<AffectRows>0</AffectRows>
</DBTaskSQLJobDetailList>
<TotalCount>1</TotalCount>
</ListDBTaskSQLJobDetailResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "3F044E33-FE09-58F1-8C61-A0F612EC****",
"Success" : true,
"ErrorMessage" : "JobId is mandatory for this action.",
"ErrorCode" : "MissingJobId",
"DBTaskSQLJobDetailList" : [ {
"CurrentSql" : "update a set id = 1 where id = 1;",
"ExecuteCount" : 1,
"Logic" : false,
"Skip" : false,
"SqlType" : "CREATE_TABLE",
"Status" : "SUCCESS",
"Log" : "log_info",
"StartTime" : "2021-12-16 00:00:00",
"EndTime" : "2021-12-16 00:00:01",
"TimeDelay" : 38,
"AffectRows" : 0
} ],
"TotalCount" : 1
}
Error codes
For a list of error codes, visit the API Error Center.