Re: how does ODS uniquely id transactions?
Posted in 1997
Wanda,
I don't have an answer for you but I can back you up with my own little
investigations. I tried it myself out of curiosity and got the same
results. So this is not an entry in the journal of irreproducible
results.
I found some other anomalies:
- When I specified a user (onlog -u jake) I still got loads of
checkpoint records displayed. Hey, man! I did not execute your ol'
checkpoint! And all my transactions that it did display were xid:13.
- When I tried onlog -x 13, it still gave me the checkpoint info.
Either Wanda and I are suffering from a deep misunderstanding over
exactly what the columns mean or onlog is so screwed up as to be useless
as a diagnostic tool. Please, someone tell me it us and give us a
better explanation than the FM (Fine Manual) tells us.
Also, I do not have a log tape to play with. If Wanda would repeat the
experiment with the log tape (onlog -d /dev/whatever) and see if the
txid makes sense now.
This would still not help for a distributed transaction, which should
have a unique TXID across the whole network.
BTW, I am using 7.13; I know Wanda is using a later version because
dbinfo('sessionid') seems to work in her qurey and fails in mine.
Any suggestions? Answers? More questions? Cold brew?
Wanda Beck wrote:
>
> Hi, All!
>
> I'm a newbie trying to understand how Online Dynamic Server 7.21
> uniquely tags its transactions. I have a trigger on a table where I
> need to extract session id, user id, and transaction id for the
> triggering statement.
> I know how to get session and user ids. To get a transaction id, I'm
> doing:
> select tx_id from sysmaster:systrans
> where tx_addr = (select us_txp from sysmaster:sysuserthreads
> where us_sid = dbinfo( 'sessionid' ) )>
> In testing this using dbaccess, I find that *all* the transactions
> fron a session have the same transaction ids, regardless of the fact
> that some are singletons and others are bracketed by BEGIN WORK and
> COMMIT WORK. Furthermore, if that user logs out, then back in again,
> and if that spot in the transaction table is available, the same
> transaction id is assigned.
>
> I've looked in the log using onlog -u <username> and see that even
> there, all the transaction ids are the same, just the addresses in the
> log are different.
>
> Can anyone tell me how I can get the unique transaction identifier for
> a triggering statement? I'm really having a hard time with this one.
--
-- Jake (In pursuit of undomesticated aquatic avians)
+----------------------------------------------------------+
|Aside from that, how did you enjoy the play, Mrs. Lincoln?|
+----------------------------------------------------------+