how does ODS uniquely id transactions?
Posted in 1997
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 from 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.
Thanks in advance!
--
Wanda Beck
Voice: (303) 413-4236
Fax: (303) 413-4025
email: wbeck@sybase.com