Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How can I get a transaction's session id from inside the transaction ?
> 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.