Tüm Ürünler
Search
Belge Merkezi

:GetErrorRequestSample

Son Güncelleme:Sep 30, 2026

SQL Explorer verilerindeki başarısız SQL sorguları hakkında bilgileri eşzamansız olarak sorgular. Belirtilen zaman aralığında en fazla 20 başarısız SQL sorgusunu sorgulayabilirsiniz.

Operation description

Not

GetErrorRequestSample eşzamansız bir işlemdir. İstek gönderildikten sonra tam sonuçlar hemen döndürülmez. Yanıtta isFinish değeri false ise 1 saniye bekleyip yeniden istek gönderin. isFinish değeri true ise tam sonuçlar döndürülür.

  • Bu API işlemi yalnızca Database Autonomy Service (DAS) Enterprise Edition'ın etkinleştirildiği ApsaraDB RDS for MySQL örneklerini ve PolarDB for MySQL kümelerini destekler. Daha fazla bilgi için DAS Enterprise Edition Satın Alma konusuna bakın.

  • DAS API işlemlerini çağırmak için bir SDK kullanıyorsanız, bölge kimliğini cn-shanghai olarak ayarlamanız gerekir.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

hdm:GetErrorRequestSample

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

InstanceId

string

Yes

Örnek kimliği.

rm-2ze8g2am97624****

NodeId

string

No

Düğüm kimliği.

Not

Veritabanı örneğiniz bir PolarDB for MySQL kümesi ise düğüm kimliğini belirtmeniz gerekir.

pi-bp179lg03445l****

SqlId

string

No

SQL sorgusu kimliği. MySQL hata kodu döndüren SQL sorgusunun kimliğini sorgulamak için GetAsyncErrorRequestListByCode işlemini çağırabilirsiniz.

2cd4432556c3dab9d825ba363637****

Start

integer

No

Sorgulanacak zaman aralığının başlangıcı. Bu parametreyi 1 Ocak 1970 00:00:00 UTC tarihinden itibaren geçen milisaniye sayısını temsil eden bir UNIX zaman damgası olarak ayarlayın.

Not

Başlangıç zamanı, veritabanı örneğinin SQL Explorer özelliğinin depolama süresi içinde olmalı ve mevcut zamandan en fazla 90 gün öncesine kadar olabilir.

1642556990714

End

integer

No

Sorgulanacak zaman aralığının sonu. Bu parametreyi 1 Ocak 1970 00:00:00 UTC tarihinden itibaren geçen milisaniye sayısını temsil eden bir UNIX zaman damgası olarak ayarlayın.

Not

Bitiş zamanı başlangıç zamanından sonra olmalıdır. Aralık 24 saati aşamaz.

1642566830000

DbName

string

No

Veritabanı adı.

testdb01

Response elements

Element

Type

Description

Example

object

The response parameters.

Code

integer

Döndürülen HTTP durum kodu.

200

Message

string

Döndürülen ileti.

Not

İstek başarılı olursa Successful döndürülür. İstek başarısız olursa, hata kodu gibi bir hata iletisi döndürülür.

Successful

Data

array<object>

Döndürülen veri.

[ { "sqlId": "2cd4432556c3dab9d825ba363637****", "database": "dbgateway", "originHost": "172.16.1****", "tables": [ "meter_****" ], "instanceId": "rm-2ze8g2am97624****", "errorCode": "1062", "user": "dbgat****", "sql": "insert into meter_****\n ( \n ****\n )\n values (now(), now(), 'bbbc8624-5e19-455a-9714-8466f688****', '2022-02-10 14:00:00', '{\"endTime\":\"2022-02-10 14:00:00\",\"endTimestamp\":1644472800,\"startTime\":\"2022-02-10 13:00:00\",\"startTimestamp\":1644469200}', null, null)", "timestamp": 1644476100435 }]

object

sqlId

string

SQL sorgusu kimliği.

2cd4432556c3dab9d825ba363637****

database

string

Veritabanı adı.

dbgateway

originHost

string

SQL ifadesini yürüten istemcinin IP adresi.

172.16.1****

tables

array

Tablo bilgileri.

string

Tablo adı.

meter_****

instanceId

string

Örnek kimliği.

rm-2ze8g2am97624****

errorCode

string

Döndürülen hata kodu.

1062

user

string

Veritabanında oturum açmak için kullanılan hesabın kullanıcı adı.

dbgat****

sql

string

SQL ifadesi.

insert into meter_****

timestamp

integer

SQL sorgusunun yürütüldüğü zaman. Bu değer, 1 Ocak 1970 00:00:00 UTC tarihinden itibaren geçen milisaniye sayısını temsil eden bir UNIX zaman damgasıdır.

1644476100435

RequestId

string

İstek kimliği.

7172BECE-588A-5961-8126-C216E16B****

Success

boolean

İsteğin başarılı olup olmadığını gösterir. Geçerli değerler:

  • true

  • false

true

Examples

Success response

JSON format

{
  "Code": 200,
  "Message": "Successful",
  "Data": [
    {
      "sqlId": "2cd4432556c3dab9d825ba363637****",
      "database": "dbgateway",
      "originHost": "172.16.1****",
      "tables": [
        "meter_****"
      ],
      "instanceId": "rm-2ze8g2am97624****",
      "errorCode": "1062",
      "user": "dbgat****",
      "sql": "insert into meter_****",
      "timestamp": 1644476100435
    }
  ],
  "RequestId": "7172BECE-588A-5961-8126-C216E16B****",
  "Success": true
}

Error codes

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.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.