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: How can I get a transaction's session id from inside the transaction ?

Re: How can I get a transaction's session id from inside the transaction ?

From: Jusung Yang <JusungYang_at_yahoo.com>
Date: 11 Oct 2002 18:55:50 -0700
Message-ID: <130ba93a.0210111755.47d083ae@posting.google.com>


> How can I find out if an Oracle object is accessed simultanously by multiple
> transactions ?

Look up v$locked_object. Though if you explicitly lock a table, it would also show up in this view.

> How can I get a transaction's session id from inside the transaction?

select sid from v$session, v$transaction where saddr=ses_addr and audsid=userenv('sessionid');

This should do it. Hpoefully I did not get all the addr mixed up.

Received on Fri Oct 11 2002 - 20:55:50 CDT

Original text of this message

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