Gets the details of the SQL task.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dms:ListDBTaskSQLJobDetail |
list |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| JobId |
integer |
Yes |
The ID of the SQL task. You can call the ListDBTaskSQLJob operation to obtain this ID. |
1276**** |
| PageNumber |
integer |
No |
The page number. |
1 |
| PageSize |
integer |
No |
The number of entries per page. |
20 |
| Tid |
integer |
No |
The ID of the tenant. You can call the GetUserActiveTenant operation to obtain this ID. |
3*** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The data returned in the response. |
||
| RequestId |
string |
The request ID. |
3F044E33-FE09-58F1-8C61-A0F612EC**** |
| Success |
boolean |
Indicates whether the request was successful. Valid values:
|
true |
| ErrorMessage |
string |
The error message that is returned. |
JobId is mandatory for this action. |
| ErrorCode |
string |
The error code that is returned. |
MissingJobId |
| DBTaskSQLJobDetailList |
array<object> |
The details of the SQL jobs. |
|
|
object |
The details of the SQL job. |
||
| JobDetailId |
integer |
The ID of the SQL job detail. |
24723**** |
| CurrentSql |
string |
The SQL statement that is currently being executed. |
update a set id = 1 where id = 1; |
| ExecuteCount |
integer |
The number of executions. |
1 |
| JobId |
integer |
The ID of the SQL job. |
1276**** |
| DbId |
integer |
The ID of the physical database. |
1988**** |
| Logic |
boolean |
Indicates whether the database is a logical database. Valid values:
|
false |
| Skip |
boolean |
Indicates whether the SQL script is skipped. Valid values:
|
false |
| SqlType |
string |
The type of the SQL statement. Examples: DELETE, UPDATE, and ALTER_TABLE. |
CREATE_TABLE |
| Status |
string |
The status of the SQL job. Valid values:
|
SUCCESS |
| Log |
string |
The execution log of the SQL job. |
log_info |
| StartTime |
string |
The time when the SQL execution started. |
2021-12-16 00:00:00 |
| EndTime |
string |
The time when the SQL execution ended. |
2021-12-16 00:00:01 |
| TimeDelay |
integer |
The duration of the SQL execution, in milliseconds. |
38 |
| AffectRows |
integer |
The number of affected rows. |
0 |
| SqlId |
integer |
|
|
| TotalCount |
integer |
The total number of SQL jobs. |
1 |
Examples
Success response
JSON format
{
"RequestId": "3F044E33-FE09-58F1-8C61-A0F612EC****",
"Success": true,
"ErrorMessage": "JobId is mandatory for this action.",
"ErrorCode": "MissingJobId",
"DBTaskSQLJobDetailList": [
{
"JobDetailId": 0,
"CurrentSql": "update a set id = 1 where id = 1;",
"ExecuteCount": 1,
"JobId": 0,
"DbId": 0,
"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,
"SqlId": 0
}
],
"TotalCount": 1
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.