Introduction to 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 of a DB Instance.
- Slow query logs
Slow query logs record statements that exceed the long_query_time value (10s by default). For details, see Managing Slow Query Logs of a DB Instance.
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 is constrained by the in-memory buffer. In high-traffic scenarios, if the buffer is full, some records may be discarded.
- If the size of a SQL statement exceeds the value of rds_sql_tracer_max_record_size, the statement is not recorded by default.
You can enable SQL Explorer on the DAS console.
- 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.
Feedback
Was this page helpful?
Provide feedbackThank 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