Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How to find out who is running the procedure ?
In article <a78lkf$cob$1_at_reader2.panix.com>, "R says...
>
>My VB app X.exe connects (RDO) and calls a stored procedure Y to run....
>
>How can I find out -exclusively- from WITHIN the procedure, W/O having VB
>pass in any ID-related paramter, the username of the connected user running
>this app ?
>
the_user := USER;
>So if the session connection info is in v$session, how do I identify the
>record for a
>particular session ?
>
select * from v$session where sid = ( select sid from v$mystat where rownum = 1);
the owner of the procedure must have direct SELECT granted on
sys.v_$session
sys.v_$mystat
for that procedure to compile that query -- not a role, a direct grant.
>Thanks
>
>Robert
>
>
-- Thomas Kyte (tkyte@us.oracle.com) http://asktom.oracle.com/ Expert one on one Oracle, programming techniques and solutions for Oracle. http://www.amazon.com/exec/obidos/ASIN/1861004826/ Opinions are mine and do not necessarily reflect those of Oracle CorpReceived on Tue Mar 19 2002 - 19:43:36 CST
![]() |
![]() |