onlog output
Posted in 2019
Topics: Logging & Checkpoints
Greetings, I am currently dumping logical logs for transactions related to a specific table to research an issue with missing data. In reviewing the output I have noticed a lot of entries for a given user id that just have 'BEGIN' to signify the start of a transaction and 'COMMIT' to end it. There are no other mnemonics between the BEGIN/COMMIT. Can anybody comment on this behavior? Here's an example below. The names have been changed to protect our platform! Thanks, Bob 18 56 BEGIN 44 64182 0 12/30/2018 03:58:57 184834 joe 38000000 b6fa0100 00000000 00000000 8....... ........ 00000000 00000000 2c000000 00000000 ........ ,....... 6ae0ed60 00000000 d188285c 00000000 j..`.... ..(\\\\.... 2c010000 02d20200 ,....... 188 56 COMMIT 44 0 148 12/30/2018 03:58:57 38000000 00000200 10000000 00000000 8....... ........ 00000000 00000000 2c000000 48010000 ........ ,...H... 6de0ed60 00000000 d188285c 8b007000 m..`.... ..(\\\\..p. d188285c 00000000 ..(\\\\.... 1018 56 BEGIN 44 64182 0 12/30/2018 03:58:57 184834 joe 38000000 b6fa0100 00000000 00000000 8....... ........ 00000000 00000000 2c000000 00000000 ........ ,....... 72e0ed60 00000000 d188285c 00000000 r..`.... ..(\\\\.... 2c010000 02d20200 ,....... 1188 56 COMMIT 44 0 1148 12/30/2018 03:58:57 38000000 00000200 10000000 00000000 8....... ........ 00000000 00000000 2c000000 48110000 ........ ,...H... 75e0ed60 00000000 d188285c 8b007000 u..`.... ..(\\\\..p. d188285c 00000000 ..(\\\\....
Original post:
Greetings,
I am currently dumping logical logs for transactions related to a specific
table to research an issue with missing data. In reviewing the output I have
noticed a lot of entries for a given user id that just have 'BEGIN' to signify
the start of a transaction and 'COMMIT' to end it. There are no other
mnemonics between the BEGIN/COMMIT.
Can anybody comment on this behavior? Here's an example below. The names have
been changed to protect our platform!
Thanks,
Bob
Response:
That is odd behavior. I tried a couple things on 12.10.FC12 and was not able
to replicate that. A begin work log record is usually not logged until
subsequent work is done, and I don't believe commit work, counts as the
subsequent work, as if I just tried to do begin work followed by commit work
in dbaccess, it doesn't log anything (for me anyway, which is sort of what I
was expecting). It might possibly make a difference as to what client is
submitting the sql (so rather then submitting the SQL via dbaccess you maybe
doing something that implicitly used transactions, like in java maybe. But
yeah, I can't recall seeing that behavior myself.
I just thought of something. How did you dump the onlog output? Did you give
it a -t <partition number> flag? If so,I believe that will dump all begin
work/commit work log records, and checkpoint records (and other types of
records that don't contain a partition number so we print them out and don't
filter them), but then leaves out anything else that doesn't match the
partition number filter. So that might be why you see just begin work/commit
work in your output. But if you just used onlog -l -n < log nubmer>, I would
not expect to see just begin work/ commit work pairs with nothing else between
them.
Jacques Renaut
HCL Informix Advanced Support
Hi Jacques,
I did use the command format to filter by tblspace partition number "onlog -t
<partnum> -l". Your explanation makes sense. One would think all transactions
that do not include the tblspace filter would be excluded. Perhaps the code
scans sequentially through the transaction log detects and writes the
begin/commit SQL and just filters for any additional records related to the
input tblspace within those boundaries.
Thanks for your insight on this.
Regards,
Bob