Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Need to get current transaction identifier
You might be able can also get the transaction id from :- v$lock or
v$transaction
.eg
select id1, id2
from v$lock
where type = 'TX'
and sid = (select sid from v$mystat where rownum < 2);
The id1 holds the rollback segment number and slot number and id2 is the sequence number. Together they uniquely identify each transaction.
just remember to put it as an after statement trigger.
Clement
user wrote:
>
> Anyone-
> I'm working on implementing some logging triggers for a database that
> is shared by several applications. I'd like to be able to group changes
> by transaction. Anyone know of a way to get a transaction ID from a
> backend trigger? I could use this to determine whether to start a new
> group record each time an update trigger fires.
> If not, I'll have to have each of the front-end apps increment a
> package variable after each commit.
>
> TIA for any thoughts...
>
> Keith Miller
Received on Mon Mar 29 1999 - 06:26:34 CST