Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have two questions:
1. How dose QR check for data changes that occur in DB2? For example, in Oracle, I believe you check for SCN increments.
2. After detecting data changes, I assume QR read the journal. How dose QR load the journal at this time?
For instance, QR read the entire portion since the last read in time, or split it into multiple reads, etc.?
Hi @iti-attunity-sup ,
There is not special 'pre-check' step to detect if new changes coming, only the API is called: return changes, or nothing.
Regards,
John.
Hello @iti-attunity-sup ,
Thanks for reaching out to Qlik Community!
>> 1. How dose QR check for data changes that occur in DB2? For example, in Oracle, I believe you check for SCN increments.
Not really. Qlik Replicate parses the Oracle redo log files to capture the changes rather than rely on the SCN increments.
For DB2i, Qlik Replicate call the function QSYS2.Display_Journal() to capture the changes.
>> 2. After detecting data changes, I assume QR read the journal. How dose QR load the journal at this time?
Qlik Replicate call the API QSYS2.Display_Journal(), and the API will read the journal which will get changes from series of journal receivers in the backend.
Hope this helps.
John.
hello John
Thanks for reply
1.What I want to know is not the actual method of capturing the changes, but how QR detects that changes have occurred.
2.After reading the entire journal once, under what conditions does QR narrow down the journal entries when reading it again? Does QR read all the entries that occurred after the last read at once?
best regards.
Hello @iti-attunity-sup ,
Thanks for the clarification.
1. Got it. Yes, QR will use the stream position (which SCN of Oracle, LSN of DB2 is part of the stream position) to determine if new changes coming.
2. QR calling the API once, and will process all the available changes in the journal, until to the end of the journal. Then QR will pause, and startup the processing again : after the retry interval trigger the capture repeatedly (see the setting in endpoint GUI, as below).
Hope this clear the doubts.
Regards,
John.
hello John
Thanks for reply
Is it correct to say that QR detects data updates by monitoring LSN increments even in the case of IBM DB2 for iSeries?
I am not sure if LSN is a feature in IBM DB2 for iSeries as well.
best regards.
Hello @iti-attunity-sup ,
Qlik Replicate use the parameter STARTING_SEQUENCE in QSYS2.Display_Journal() API to locate the position. You may set SOURCE_CAPTURE to Verbose and check the task log file to understand the detailed parameter usage.
Regards,
John.
Hello John
Thanks for reply.
I understand that for a single read, the position following the previously read journal position is specified in STARTING_SEQUENCE, and it reads until the end.
When is the QSYS2.Display_Journal() API called?
Does it check the sequence every 5 seconds("Check for changes every (sec)") and call the API to read the journal if the sequence has incremented? Or does it call it every 5 seconds regardless?
best regards.
Hi @iti-attunity-sup ,
According to my understanding, if there are any further changes recorded in the journal, Replicate will continue reading them. Once all changes have been read, Replicate will wait for 5 seconds before running the API to check the source databases for any new changes.
Regards,
Desmond
Hello Desmond
Thanks for reply.
Is it correct to say that the QSYS2.Display_Journal() API is called every 5 seconds, except when changes are continuously recorded in the journal?
best regards.
Hi @iti-attunity-sup ,
Yes.
- If Replicate finds changes in the journal, it retrieves records using the QSYS2.Display_Journal().
- If Replicate reaches the end of the journal, i.e. no more changes, Replicate will check again after 5 seconds.
Regards,
Desmond