This topic describes the fields in the SQL audit log entries that are generated by Distributed Relational Database Service (DRDS).

Field Description
__topic__ The topic of the log entry. Valid values: drds_audit_log.
instance_id The ID of the DRDS instance.
instance_name The name of the DRDS instance.
owner_id The ID of the Alibaba Cloud account that owns the DRDS instance.
region The region where the DRDS instance resides.
db_name The name of the DRDS database.
user The username of the account that executes the SQL statement.
client_ip The IP address of the database client that is used to access the DRDS instance.
client_port The port number of the database client that is used to access the DRDS instance.
sql The SQL statement that is executed.
trace_id The trace ID of the SQL statement. If the SQL statement is executed in a transaction, the value of this field consists of a trace ID, a hyphen (-), and a number. For example, the value can be drdsabcdxyz-1.
sql_code The hash value of the template SQL statement.
hint The hint that specifies how to execute the SQL statement.
table_name The name of the table that is specified in the SQL statement. If multiple tables are specified in the SQL statement, the names of the tables are separated by commas (,).
sql_type The type of the SQL statement. Valid values: Select, Insert, Update, Delete, Set, Alter, Create, Drop, Truncate, Replace, and Other.
sql_type_detail The name of the SQL parser.
response_time The amount of time that is taken by the DRDS instance to respond. Unit: microseconds.
affect_rows The number of rows that are returned for the SQL statement. If the SQL statement specifies an add, delete, or modify operation, the value of this field is the number of rows that are affected. If the SQL statement specifies a query operation, the value of this field is the number of rows that are returned.
fail Indicates whether the SQL statement is successfully executed. Valid values:
  • 0: successful
  • 1: failed
sql_time The time at which the SQL statement is executed.