Overview of TaurusDB Logs
TaurusDB supports the following types of logs:
- Error logs
Error logs contain logs generated while a database is running, including error messages and slow SQL query statements. For details, see Managing Error Logs.
- Slow query logs
Slow query logs record statements that take longer than the time specified by long_query_time (10s by default). For details, see Managing Slow Query Logs.
You can use the following parameters to control TaurusDB logging:
- log_queries_not_using_indexes: controls whether to record queries without indexes. The default value is OFF.
- log_throttle_queries_not_using_indexes: limits the number of SQL statements without indexes per minute that can be written to the slow query log. The default value is 0.
- SQL Explorer
Enabling SQL Explorer will allow TaurusDB to store all SQL statement logs for analysis.
SQL Explorer cannot record all data. It has the following constraints:
- SQL Explorer does not guarantee that all data is recorded. The following limitations apply:
- SQL Explorer is subject to in-memory buffer limits. Under heavy workloads, there is a small chance that some records may be dropped when the buffer is full.
- By default, a SQL Explorer record is dropped if its size exceeds the configured limit.
You can use the rds_sql_tracer_max_record_size parameter to configure whether oversized records are dropped. To set this parameter, see Modifying Instance Parameters.
- If the instance kernel version is 2.0.81.260900 or later, you can modify the rds_sql_tracer_truncate_query parameter to control whether SQL statements that exceed the length limit are truncated and retained. The original SQL statement will be incomplete after truncation.
You can enable SQL Explorer on the DAS console.
- SQL Explorer does not guarantee that all data is recorded. The following limitations apply:
- DDL logs
DDL logs record the execution of data definition language (DDL) statements, including CREATE, ALTER, DROP, TRUNCATE, and RENAME. They provide a complete audit trail of database schema changes.
TaurusDB allows you to download DDL logs and configure a DDL log transfer policy. DDL logs are automatically deleted when they expire, but there is a delay in this process. For details, see Managing DDL Logs.
- SQL audit logs
If you enable SQL audit, the system will log all SQL operations, making it convenient for you to download and query them.
By default, SQL audit is disabled. Enabling this function may affect database performance. For details, see Enabling SQL Audit.
- Binlogs
Binlogs record all DDL and DML statements (except data query statements). You can download binlogs to a local PC for further analysis. Binlogs are stored in OBS buckets. For details, see Querying and Downloading Binlogs.
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot