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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Can I use v$session.taddr for this?

Re: Can I use v$session.taddr for this?

From: Daniel Morgan <damorgan_at_exxesolutions.com>
Date: Wed, 07 May 2003 23:12:07 -0700
Message-ID: <3EB9F537.2053150@exxesolutions.com>


"Ana C. Dent" wrote:

> Mike wrote:
> > All,
> >
> > I have an application which has triggers attached to several tables.
> > A single transaction may perform insert/update/delete on more than one
> > table. Each trigger writes data to a separate logging table that I
> > have created for this purpose.
> >
> > I'd like to be able to tie all the logging data from each transaction
> > together, even though it may have been created by the separate
> > triggers. Can I use v$session.taddr for this? I'm hoping that each
> > separate transaction will have a taddr value which will persist until
> > a rollback or commit, and then have another value for the next
> > transaction.
> >
> > Or is there something else I should be looking at?
> >
> > Thanks in advance.
> >
> > -- Mike
>
> IRRC, from v$transaction
> XIDUSN
> XIDSLOT
> XIDSQN
> would comprise a UNIQUE key for a single transcation.
>
> HTH & YMMV
>
> HAND!
Alternatively:

SELECT sequence_transaction_no.NEXTVAL
INTO x
FROM dual;

And then use it for that transaction:

--
Daniel Morgan
http://www.outreach.washington.edu/extinfo/certprog/oad/oad_crs.asp
damorgan_at_x.washington.edu
(replace 'x' with a 'u' to reply)
Received on Thu May 08 2003 - 01:12:07 CDT

Original text of this message

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