Autojournaling¶
With the agent property autoJournal, a Db2 for i Capture Agent starts journaling a physical file that isn't
journaled when you subscribe to it, so you don't have to.
Default¶
The Add Capture Agent wizard sets autoJournal=true for every Db2 for i agent. Without the property, an agent
doesn't autojournal (its own default is false).
To turn it off, set autoJournal to false on the agent's Configuration tab
(saving restarts a running agent), and journal the files yourself (see Journaling).
How it works¶
When the Replicator Service subscribes to a file that isn't journaled, the agent:
- Looks for its journal for the file's auxiliary storage pool (ASP). If there's none yet, it creates:
- a library named after the agent schema (first 8 characters) and the two-digit ASP number, in that ASP, for
example
SQDR01for agent schemaSQDRand ASP 1; - a journal receiver
SQ<nn>X0001(for exampleSQ01X0001) in the receiver library (see below); - a journal
SQ<nn>(for exampleSQ01) in the new library, with system-managed receivers (MNGRCV(*SYSTEM)) that are deleted when no longer needed (DLTRCV(*YES);*NOif the agent propertydeleteLogsWithoutSaveisfalse).
- a library named after the agent schema (first 8 characters) and the two-digit ASP number, in that ASP, for
example
- Gives the agent user authority to the file and journals it there with before and after images, without open and
close entries (
STRJRNPF … IMAGES(*BOTH) OMTJRNE(*OPNCLO); after images only if the agent propertyalwaysUseRowIdistrue).
The next file in the same ASP uses the same journal.
Receiver library¶
The journal receivers go in the library set by the agent property receiverLibrary; by default, the agent's control
library (the agent schema, for example SQDR).
Security¶
- The agent user creates the journal library and its objects.
*PUBLICgets*OBJMGT,*OBJOPRand*EXECUTEauthority to the journal the agent creates.- The agent user gets
*ALLauthority to each file it starts journaling.
If only specific users may access the files, don't use autojournaling: create the journals, receivers and receiver
libraries yourself with the security you need (see Create unique journals),
start journaling, and set autoJournal to false.
Recommendations¶
Tip
With autojournaling, plan the ASP layout before you install Stelo Capture: for best performance, put the journal
receiver library in a different ASP than the files you replicate, and set receiverLibrary to it.