The solidDB® Transaction Log Reader is a solution that makes it possible to read log records from the solidDB® transaction log transaction by transaction. Using the Log Reader interface, you can, for example, write an application that listens to and displays log traffic in the solidDB® server.
The Log Reader is based on a read-only system table called SYS_LOGwhere each row corresponds to a single log entry. The SYS_LOG table is a virtual table: when the Log Reader receives an SQL request for the SYS_LOG table, the appropriate result set is generated dynamically from the internal log structures. Each log read can be started from different log record.
For each entry in the transaction log, the SYS_LOG table contains data for identifying the log record, the type of transaction and statement executed, as well as the row with the changed data itself.
The SYS_LOG table can be accessed with ODBC and JDBC drivers using SQL statements. For example, an application could be written to read the solidDB® transaction log and extract records pertaining to SQL DML statements. The application could then reconstruct the statements into plain text SQL strings and print them to a desired type of output.
Applications can read the SYS_LOG table both locally and remotely. Several applications can read the SYS_LOG table concurrently without interference.
A sample application that demonstrates the use of the Log Reader interface is included in the solidDB® package, available in samples/logreader directory.
For a detailed description of the SYS_LOG table, see “SYS_LOG”in the solidDB® SQL Guide.