Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: PL/SQL and v$session
Thanks... I thought it might have something to do with privileges, but why can't I do a select on v$session without having select rights to v_$session?
One of my colleagues needs the sessionid to temporarily store somthing in tye database which is invalidated when the session finishes.
Any other way to store information in the database, visible for thoer sessions but "a gonner" when the session ends?
Peter
EMail: Peter_Vestergaard_at_saxotech.com
Remove xxx on reply
> Why so complicated?
> Why don't you use
>
> select sid
> from v$session
> where audsid = userenv('sessionid')
>
> This will work for all users, except for sys.
> Also, the v$session is a synonym for a view you have privilege on using a
> role. You'll need direct privilege, or the use the invokers right pragma
in
> 8i.
> Grant select on v$_session to <your user>
Received on Fri Jul 07 2000 - 00:00:00 CDT