The Change Data Capture API
The Change Data Capture API allows external client applications to capture transactional data from IBM® Informix® databases.
The Change Data Capture API provides functions to capture transactional data. You can use a variety of clients to run these functions, such as, JDBC, ODBC, ESQL/C, and DB-Access. The data is returned as CDC records by standard IBM Informix smart large object read functions. How the captured data is processed depends on your application. For example, you can write an application to replicate data from the IBM Informix database to another, heterogeneous, database.
- INSERT
- DELETE
- UPDATE
- TRUNCATE
The Change Data Capture API starts capturing transactions from the current logical log and processes all transactions sequentially. The first time you start capturing data for a particular table, data capture starts at the current log position. If you later stop capture and the restart it, you can restart at the point in the logical logs where data capture was stopped. You cannot go backwards in time through the logical logs to capture the history of the table or perform random seeking in the logical logs.
At the beginning of data capture for a table, the Change Data Capture API provides the table schema information that you can use in your application to create a target table. However, any changes to the table schema after data capture begins are not captured by the Change Data Capture API.
The Change Data Capture API can only provide data as that data is changing; it does not provide an initial snapshot of the contents of the table. If you need a populated target table, you can externally load the existing data to the target table. Alternatively, you can create dummy updates to the table for each row so that the Change Data Capture API can capture those updates and populate the target table. Because logging is enabled, dummy updates produce logical log records.
The Change Data Capture API does not capture changes to table schemas or any other database changes. If you attempt to alter a table while data capture is active, the alter process fails.
The Change Data Capture API can capture data only from databases that have logging enabled.