This topic describes the fields of SQL audit logs in PolarDB-X 1.0.
Log field | Description |
---|---|
__topic__ | The topic of a log. Valid value: drds_audit_log. |
instance_id | The ID of a PolarDB-X 1.0 instance. |
instance_name | The name of a PolarDB-X 1.0 instance. |
owner_id | The ID of an Alibaba Cloud account. |
region | The region where a PolarDB-X 1.0 instance resides. |
db_name | The name of a PolarDB-X 1.0 database. |
user | The name of a user who executes an SQL statement. |
client_ip | The IP address of a client that accesses a PolarDB-X instance. |
client_port | The port number of a client that accesses a PolarDB-X instance. |
sql | The SQL statement. |
trace_id | The trace ID of an SQL statement when the statement is executed. If a transaction is executed, it is tracked by using an ID. The ID consists of the trace ID, a hyphen (-), and a number, for example, drdsabcdxyz-1. |
sql_code | The hash value of a template SQL statement. |
hint | The hint that is used to execute an SQL statement. |
table_name | The names of the tables that are involved in a query. Multiple tables are separated by commas (,). |
sql_type | The type of an SQL statement. Valid values: Select, Insert, Update, Delete, Set, Alter, Create, Drop, Truncate, Replace, and Other. |
sql_type_detail | The name of an SQL parser. |
response_time | The response time. Unit: microseconds. |
affect_rows | The number of rows that are returned after an SQL statement is executed. If an SQL statement is executed to add, delete, or modify data, the value of this field indicates the number of rows that are added, deleted, or modified. If an SQL statement is executed to query data, the value of this field indicates the number of rows that are returned. |
fail | Indicates whether an SQL statement fails to be executed.
The value 0 indicates that the SQL statement is executed. A value that is not 0 indicates that SQL statement fails to be executed. |
sql_time | The time when an SQL statement is executed. |