Keep the source's journals and logs in check¶
A Capture Agent reads changes from the source database's log: journal receivers on Db2 for i, the transaction or archive logs on the other databases. If a log the agent still needs is deleted, the agent can't continue, and the affected subscriptions need new baselines. Read this page before you clean up journal receivers or logs on a source, or change how long they're kept.
Who needs this
Db2 for i sources: the whole page. Stelo Capture keeps the journal receivers the agent still needs; this page says how to delete the others safely and how to quiet the operator messages this can cause. Other sources: only Other source databases: the database must keep its logs long enough for the agent.
Db2 for i journal receivers¶
Deleting receivers yourself¶
- Delete only receivers earlier in the chain than the one the Capture Agent is reading. The exit program (see below) refuses the others and logs the refusal with its reason code.
- If you delete a receiver the Capture Agent still needs (for example with
managedLogs=false, or after removing the exit program), every subscription that reads that journal needs a new baseline before it can replicate again. - Stelo Capture never deletes a journal, journal receiver, file or table itself.
Too many QSYSOPR messages¶
When the exit program refuses a deletion, IBM i tries again after the journal's delete receiver delay and sends a
message to QSYSOPR each time. After an IPL, if the agent isn't reading yet, this can flood the operator's message
queue. For your own journals, lengthen the delay, for example to 24 hours (it stays until you change it):
CHGJRN JRN(MYLIB/MYJRN) DLTRCVDLY(1440)
The journals Stelo Capture creates for your tables (SQnn) already use 1440 minutes. The journal of the agent's own
control library (QSQJRN in the agent schema, for example SQDR/QSQJRN) doesn't: Stelo Capture sets its receiver
options but not its delay, so it keeps the IBM i default of 10 minutes. If its receivers cause the messages, change it
the same way:
CHGJRN JRN(SQDR/QSQJRN) DLTRCVDLY(1440)
How Stelo Capture protects receivers¶
A Db2 for i Capture Agent registers an exit program, CADLTRCV (Capture Agent Delete Receiver), for the IBM i exit
point QIBM_QJO_DLT_JRNRCV when it starts (unless both managedLogs and autoJournal are false). IBM i calls it
before deleting a journal receiver, whether the system (MNGRCV(*SYSTEM) DLTRCV(*YES)) or a user (DLTJRNRCV) deletes
it. It allows the deletion only if the receiver is earlier in the chain than the one the Capture Agent is reading, so
it works even while the agent is stopped. Each decision has a reason code; see
Exit Program Reason Codes.
- Journals Stelo Capture created (when it starts journaling a table that had none, see Autojournaling) are always protected.
- Your own journals are protected while
managedLogsistrue. WithmanagedLogs=false, their receivers can be deleted even if the agent still needs them.
Journal properties¶
Set these on the agent's Configuration tab.
| Property | What it does | Default | When to change it |
|---|---|---|---|
managedLogs |
Protects the receivers of your own journals that the Capture Agent still needs. For remote journals, also keeps the agent's reading position up to date on the remote system, for the exit program there. | true for agents created in the SQDR Control Center (false when absent) |
Set false only if you manage receivers yourself and accept the risk (see Remove the Db2 for i exit program). |
autoJournal |
Starts journaling tables that aren't journaled when they're subscribed, and restores journaling after a non-Normal startup. | true for agents created in the SQDR Control Center (false when absent) |
See Autojournaling. |
deleteLogsWithoutSave |
For journals Stelo Capture creates: true creates them with DLTRCV(*YES), so IBM i deletes receivers it no longer needs without saving them; false uses DLTRCV(*NO), so you save and delete them. Applies to journals created after the change. |
true |
Set false if your backup policy requires saving receivers. |
receiverLibrary |
The library for the receivers of journals Stelo Capture creates. | The agent's source schema (usually SQDR) |
To keep receivers in a library of your choice, for example on another ASP or for backup. |
Journals Stelo Capture creates are named SQnn after the ASP number, in a library named after the agent schema and
the ASP (for example SQDR01), with MNGRCV(*SYSTEM) and a delete receiver delay of 1440 minutes.
Other source databases¶
For Db2 LUW, Oracle, SQL Server, MySQL and MariaDB, PostgreSQL and Informix, the Capture Agent reads the database's own change logs. The database must keep them long enough for the agent to read them, including the longest time an agent may be stopped. Each source's page says what to keep: Db2 LUW, Oracle, SQL Server, MySQL and MariaDB, PostgreSQL, Informix.