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 ?
Well, it is a simple query, no? Why not run it first before posting
it. It does not make sense. There were 2 errors that you made.
SQL> desc v$mystat
Name Null? Type ----------------------------------------- -------- --------- SID NUMBER STATISTIC# NUMBER VALUE NUMBER
2. There is no rowid column in v$mystat. So, rownum=1 would make sense, not rowid=1.
Getting SID is not that big of a deal. You can indeed get SID of the current session from v$mystat. But when you put 2 errors like that together, you have to admit it is pretty confusing.
Ban Spam <ban-spam_at_operamail.com> wrote in message news:<Xns92A7AF2C666C1SunnySD_at_68.6.19.6>...
> JusungYang_at_yahoo.com (Jusung Yang) wrote in
> news:130ba93a.0210141154.18e69e6_at_posting.google.com:
>
> > ???
> >
> > Can you take one more look of your query and explain a bit?
> >
> > - Jusung Yang
> >
> >
> > Ban Spam <ban-spam_at_operamail.com> wrote in message
> >> select sid from v$mystats
> >> where rowid = 1;
> >
>
> SQL> DESC V$MYSTATS
> -- do it your self & what do you see?
> -- it does exactly what you requested.
> -- it returns the SID of the session invoking the query.
Received on Tue Oct 15 2002 - 03:30:19 CDT