Tüm Ürünler
Search
Belge Merkezi

:GetDasSQLLogHotData

Son Güncelleme:Sep 30, 2026

SQL denetim günlüklerinden sıcak verileri getirir.

Operation description

Bu API'yi çağırmadan önce aşağıdaki gereksinimleri karşıladığınızdan emin olun:

  • Alibaba Cloud SDK veya DAS SDK'nın en son sürümünü kullanın.

  • DAS hizmetini çağırmak için bir SDK kullanırken bölgeyi cn-shanghai olarak belirtin.

  • Desteklenen motorlar: PolarDB MySQL, ApsaraDB RDS for MySQL, ApsaraDB RDS for PostgreSQL ve ApsaraDB RDS for SQLServer.

  • Örnek için günlük indekslemeyi etkinleştirin.

Not

Sorgu başlangıç zamanı son 7 gün içinde olmalıdır. Sorgu süresi 1 günü aşamaz. API en fazla 10.000 kayıt döndürür.

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:GetDasSQLLogHotData

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

InstanceId

string

Yes

Veritabanı örneğinin kimliği.

rm-2ze1jdv45i7l6****

Start

integer

Yes

Sorgulanacak zaman aralığının başlangıcı. Bu değer milisaniye cinsinden bir Unix zaman damgası olmalıdır.

Not

Yalnızca DAS Enterprise Edition'ı etkinleştirdikten sonra oluşturulan verileri sorgulayabilirsiniz. Başlangıç zamanı mevcut zamandan yedi gün öncesinden daha erken olamaz.

1684734297000

End

integer

Yes

Sorgulanacak zaman aralığının sonu. Bu değer milisaniye cinsinden bir Unix zaman damgası olmalıdır.

Not

Bitiş zamanı başlangıç zamanından sonra olmalıdır. Zaman aralığı bir günü aşamaz.

1684820697000

QueryKeyword

string

No

Sorgu anahtar sözcüğü.

Not

Bulanık arama desteklenir. En fazla 10 anahtar sözcük belirtebilirsiniz. Birden fazla anahtar sözcüğü boşlukla ayırın. Örneğin: a1 b2 c3.

a1 b2

AccountName

string

No

Veritabanı hesabı.

Not

Birden fazla veritabanı hesabı belirtebilirsiniz. Birden fazla hesabı boşlukla ayırın. Örneğin: user1 user2 user3.

testuser

DBName

string

No

Veritabanı adı.

Not

Birden fazla veritabanı adı belirtebilirsiniz. Birden fazla adı boşlukla ayırın. Örneğin: DB1 DB2 DB3.

testDB

HostAddress

string

No

İstemci IP adresi.

Not

Birden fazla istemci IP adresi belirtebilirsiniz. Birden fazla IP adresini boşlukla ayırın. Örneğin: IP1 IP2 IP3.

47.100.XX.XX

LogicalOperator

string

No

Birden fazla anahtar sözcükle kullanılacak mantıksal operatör. Geçerli değerler:

  • or

  • and

or

MaxLatancy

integer

No

Mikrosaniye cinsinden maksimum çalıştırma süresi. Çalıştırma süresi bu değerden az olan SQL ifadelerini döndürür.

100

MaxScanRows

integer

No

Maksimum taranan satır sayısı. Bu satır sayısından daha az satır tarayan SQL ifadelerini döndürür.

10000

MinLatancy

integer

No

Mikrosaniye cinsinden minimum çalıştırma süresi. Çalıştırma süresi bu değere eşit veya bu değerden büyük olan SQL ifadelerini döndürür.

10

MinScanRows

integer

No

Minimum taranan satır sayısı. En az bu sayıda satır tarayan SQL ifadelerini döndürür.

10

SqlType

string

No

SQL türü.

Valid values:

  • select :

    SELECT ifadesi.

  • update :

    UPDATE ifadesi.

  • delete :

    DELETE ifadesi.

select

State

string

No

Çalıştırma durumu. Başarılı bir şekilde çalıştırılan SQL ifadelerini sorgulamak için bu parametreyi 0 olarak ayarlayın. İlgili SQL ifadelerini sorgulamak için bir hata kodu da belirtebilirsiniz.

0

ThreadID

string

No

İş parçacığı kimliği.

Not

Birden fazla iş parçacığı kimliği belirtebilirsiniz. Birden fazla kimliği boşlukla ayırın. Örneğin: 657 658 659.

657

PageNumbers

integer

No

Döndürülecek sayfa numarası. Sayfalar 1'den başlar. Varsayılan değer 1'dir.

2

MaxRecordsPerPage

integer

No

Sayfa başına maksimum giriş sayısı. Geçerli değerler: 5 ila 100.

10

SortKey

string

No

Sıralama anahtarı. Geçerli değerler:

  • ScanRows: taranan satırlar.

  • UpdateRows: güncellenen satırlar.

  • Consume: çalıştırma süresi.

  • OriginTime: Çalıştırma başlangıç zamanı.

  • ReturnRows: döndürülen satırlar.

ScanRows

SortMethod

string

No

Sıralama düzeni. Geçerli değerler:

  • ASC: artan

  • DESC: azalan

ASC

ChildDBInstanceIDs

string

No

Düğüm kimliği.

Not

Veritabanı örneği bir PolarDB for MySQL kümesi ise bu parametre gereklidir.

pi-bp179lg03445l****

Role

string

No

Ayrılmış bir parametre.

None

TraceId

string

No

Ayrılmış bir parametre.

None

MinRows

integer

No

Ayrılmış bir parametre.

None

MaxRows

integer

No

Ayrılmış bir parametre.

None

MinSpillCnt

integer

No

Ayrılmış bir parametre.

None

MaxSpillCnt

integer

No

Ayrılmış bir parametre.

None

TransactionId

string

No

İşlem kimliği.

0

Fail

string

No

SQL çalıştırma hata kodu. Hata kodunu almak için GetAsyncErrorRequestStatByCode işlemini çağırabilirsiniz.

1064

Response elements

Element

Type

Description

Example

object

Code

string

Durum kodu.

200

Message

string

Yanıt mesajı.

Not

İstek başarılı olursa Successful döndürülür. İstek başarısız olursa, bir hata kodu içerebilen bir hata mesajı döndürülür.

Successful

RequestId

string

Alibaba Cloud tarafından oluşturulan benzersiz istek kimliği.

0A74B755-98B7-59DB-8724-1321B394****

Success

string

İsteğin başarılı olup olmadığını gösterir:

  • true: İstek başarılı oldu.

  • false: İstek başarısız oldu.

true

Data

object

Döndürülen veriler.

List

array<object>

Döndürülen verilerin listesi.

object

SQL içgörü ve denetim verileri.

Latancy

integer

Mikrosaniye cinsinden gecikme süresi.

10000

Ext

string

Ayrılmış bir parametre.

None

ExecuteTime

string

Çalıştırmanın kaydedildiği UTC zamanı, yyyy-MM-ddTHH:mm:ssZ biçimindedir.

2023-05-23 T12:11:20Z

OriginTime

string

Çalıştırmanın kaydedildiği tam UTC zamanı, yyyy-MM-ddTHH:mm:ss.SSSZ biçimindedir.

2023-05-23 T12:11:20.999Z

HostAddress

string

İstemci IP adresi.

47.100.XX.XX

UpdateRows

integer

Güncellenen satır sayısı.

30

LogicRead

integer

Mantıksal okuma sayısı.

12

SQLText

string

SQL ifadesi.

select 1

LockTime

integer

Mikrosaniye cinsinden kilit bekleme süresi.

1

ScanRows

integer

Taranan satır sayısı.

29

ThreadID

integer

İş parçacığı kimliği.

657

State

string

Çalıştırma durumu. 0 değeri başarıyı gösterir. Diğer herhangi bir değer bir hata kodudur.

0

DBName

string

Veritabanı adı.

testDB

SqlType

string

SQL türü. Geçerli değerler:

  • select

  • update

  • delete

select

AccountName

string

Veritabanı hesabı.

testuser

PhysicSyncRead

integer

Fiziksel senkron okuma sayısı.

0

PhysicAsyncRead

integer

Fiziksel asenkron okuma sayısı.

0

TransactionId

string

İşlem kimliği.

0

ReturnRows

integer

Döndürülen satır sayısı.

1

NodeId

string

Düğüm kimliği.

pi-bp120roy76f3qbd84

Total

integer

Toplam kayıt sayısı.

20

PageNo

integer

Sayfa numarası.

2

PageSize

integer

Sayfa boyutu.

10

Extra

any

Ayrılmış bir parametre.

None

Examples

Success response

JSON format

{
  "Code": "200",
  "Message": "Successful",
  "RequestId": "0A74B755-98B7-59DB-8724-1321B394****",
  "Success": "true",
  "Data": {
    "List": [
      {
        "Latancy": 10000,
        "Ext": "None",
        "ExecuteTime": "2023-05-23 T12:11:20Z",
        "OriginTime": "2023-05-23 T12:11:20.999Z",
        "HostAddress": "47.100.XX.XX",
        "UpdateRows": 30,
        "LogicRead": 12,
        "SQLText": "select 1",
        "LockTime": 1,
        "ScanRows": 29,
        "ThreadID": 657,
        "State": "0",
        "DBName": "testDB",
        "SqlType": "select",
        "AccountName": "testuser",
        "PhysicSyncRead": 0,
        "PhysicAsyncRead": 0,
        "TransactionId": "0",
        "ReturnRows": 1,
        "NodeId": "pi-bp120roy76f3qbd84"
      }
    ],
    "Total": 20,
    "PageNo": 2,
    "PageSize": 10,
    "Extra": "None"
  }
}

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.