OceanBase LogMiner (oblogminer) is a command-line tool for analyzing online and archived logs of OceanBase Database. oblogminer uses OceanBase Change Data Capture (obcdc) to pull and parse commit logs (clogs), converts the logical logs output by obcdc to a readable format, and stores the logs in the specified location.
Features
Read and analyze online or archived logs.
Store analysis results in local storage or Alibaba Cloud Object Storage Service (OSS).
Support various conditions for filtering records.
Support diverse formats for displaying records.
Generate redo or undo SQL statements.
Offer multiple command-line options.
Scenarios
Self service
oblogminer can analyze and process online and archived logs, allowing you to view all modifications within a specified period. This pinpoints the time of failure, reduces troubleshooting complexity, and boosts diagnostic efficiency. This way, you can troubleshoot issues quickly and independently.
Fine-grained recovery
oblogminer can generate undo SQL statements in case of misoperation on the database. This ensures SQL flashback for fine-grained recovery.
Data analysis
oblogminer can retrieve and display all modifications made by DDL and DML operations in their execution order. In addition, oblogminer displays clog information such as transactions and schemas in a well-organized and user-friendly way for better observability.
Limitations
Built on obcdc, oblogminer is subject to the limitations of obcdc. For example, oblogminer is incompatible with OceanBase Database versions that obcdc does not support.
oblogminer does not display aborted transactions. By default, only committed transactions are displayed. All operations within a transaction are aggregated for output, and transactions are displayed in their commit order.
oblogminer does not display the data rolled back by using a ROLLBACK TO SAVEPOINT statement.
oblogminer does not analyze the logs of the standby database.
oblogminer does not analyze nor display the data of transactions and index tables.
oblogminer does not support specifying files for analysis because this involves distributed transaction assembly when multiple redo files reside on different servers and incomplete transaction data during the analysis of the specified files.
Like Oracle, oblogminer does not parse nor display the data of temporary tables.
oblogminer does not support filtering DDL statements.
oblogminer marks records containing large object (LOB) types or unsupported types with
/* POTENTIALLY INACCURATE */in the redo or undo SQL statements to indicate that the results of these statements may be incorrect.oblogminer may display transactions that exceed the specified end time to ensure transactional integrity.
oblogminer does not support data imported by using direct load.
oblogminer cannot be used in the sys tenant.
When reading archived logs, oblogminer requires that the archived logs be continuous and that the log archiving feature remain enabled.
Due to delays in log archiving, analyzing logs archived within the recent time period specified in archive_lag_target can be slow.
If you connect to OceanBase Database by using OceanBase Database Proxy (ODP) for log analysis, usernames specified in the format of
user@tenant#clusterby using the-u/--user-nameoption are not supported.oblogminer does not analyze archived logs stored in object storage services.