Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Need to get current transaction identifier

Re: Need to get current transaction identifier

From: schong <schong_at_werple.mira.net.au>
Date: Mon, 29 Mar 1999 04:26:34 -0800
Message-ID: <36FF717A.64C9@werple.mira.net.au>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US