Mengkueri templat SQL yang gagal dijalankan.
Deskripsi operasi
-
If you use Alibaba Cloud SDK or Database Autonomy Service (DAS) SDK to call this operation, we recommend that you use the latest version of the SDK.
-
If you use an SDK to call API operations of DAS, you must set the region ID to cn-shanghai.
-
This operation supports the following database engines:
-
ApsaraDB RDS for MySQL
-
PolarDB for MySQL
-
ApsaraDB RDS for PostgreSQL
-
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
hdm:GetQueryOptimizeExecErrorStats |
get |
*全部资源
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| Engine |
string |
Yes |
Mesin database. Nilai valid:
|
MySQL |
| InstanceIds |
string |
No |
ID instans. Pisahkan beberapa ID dengan koma (,). |
rm-2ze8g2am97624**** |
| Keywords |
string |
No |
Kata kunci templat SQL. Pisahkan beberapa kata kunci dengan spasi. |
select update |
| LogicalOperator |
string |
No |
Hubungan logis antara beberapa kata kunci. Nilai valid:
|
or |
| DbNames |
string |
No |
Nama database yang akan dikueri. |
testdb01 |
| Time |
string |
Yes |
Rentang pengatur waktu yang akan dikueri. Tentukan pengatur waktu sebagai Stempel waktu UNIX. Unit: milidetik. |
1642953600000 |
| PageSize |
string |
Yes |
Jumlah entri per halaman. Nilai default: 10. |
10 |
| PageNo |
string |
Yes |
Nomor halaman. Halaman dimulai dari halaman 1. Nilai default: 1. |
1 |
| OrderBy |
string |
No |
Bidang yang digunakan untuk mengurutkan entri yang dikembalikan. Hanya error_count yang didukung, yang mengurutkan entri berdasarkan jumlah eksekusi yang gagal. |
error_count |
| Asc |
string |
No |
Apakah akan mengurutkan entri yang dikembalikan dalam Pesanan menaik. Nilai default: true. Nilai valid:
|
true |
| Region |
string |
No |
Wilayah tempat instans berada. Nilai valid:
Parameter ini hanya berlaku jika InstanceIds dikosongkan. Jika Anda mengosongkan InstanceIds, sistem mengambil data dari wilayah yang ditetapkan oleh Region. Secara default, Region diatur ke cn-china. Jika Anda menentukan InstanceIds, Region tidak berlaku dan sistem mengambil data dari wilayah tempat instans pertama yang ditentukan berada.**** Catatan
Atur parameter ini ke cn-china untuk instans yang dibuat di wilayah di daratan Tiongkok. |
cn-china |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| Code |
string |
The HTTP status code returned. |
200 |
| Message |
string |
The returned message. |
Successful |
| Data |
object |
The detailed information, including the error codes and the number of entries that are returned. |
|
| Total |
integer |
The total number of entries returned. |
19 |
| PageNo |
integer |
The page number. |
1 |
| PageSize |
integer |
The number of entries per page. |
10 |
| Extra |
string |
The reserved parameter. |
None |
| List |
array<object> |
The information about the SQL templates that failed to execute. |
|
|
object |
|||
| InstanceId |
string |
The instance ID. |
rm-2ze8g2am97624**** |
| InstanceName |
string |
The alias of the database instance. |
test01 |
| Dbname |
string |
The name of the database. |
testdb01 |
| SqlId |
string |
The SQL template ID. |
2e8147b5ca2dfc640dfd5e43d96a**** |
| SqlText |
string |
The content of the SQL template. |
select * from test1 |
| ErrorCode |
string |
The error code returned if the request failed. |
1146 |
| ErrorCount |
integer |
The number of errors. |
10 |
| RequestId |
string |
The request ID. |
B6D17591-B48B-4D31-9CD6-9B9796B2**** |
| Success |
string |
Indicates whether the request was successful. Valid values:
|
true |
Contoh
Respons sukses
JSONformat
{
"Code": "200",
"Message": "Successful",
"Data": {
"Total": 19,
"PageNo": 1,
"PageSize": 10,
"Extra": "None",
"List": [
{
"InstanceId": "rm-2ze8g2am97624****",
"InstanceName": "test01",
"Dbname": "testdb01",
"SqlId": "2e8147b5ca2dfc640dfd5e43d96a****",
"SqlText": "select * from test1",
"ErrorCode": "1146",
"ErrorCount": 10
}
]
},
"RequestId": "B6D17591-B48B-4D31-9CD6-9B9796B2****",
"Success": "true"
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParams | The request parameters are invalid. | |
| 403 | NoPermission | You are not authorized to do this action. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.