From: "Peter Smed Vestergaard" <Peter_Vestergaard@saxotech.com>
Subject: Re: PL/SQL and v$session
Date: 2000/07/07
Message-ID: <d4k95.138$m12.4146@news.get2net.dk>#1/1
References: <yFi95.104$m12.3341@news.get2net.dk> <962969400.6780.1.pluto.d4ee154e@news.demon.nl>
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
X-Complaints-To: abuse@uni2.dk
X-Trace: news.get2net.dk 962973065 192.38.129.130 (Fri, 07 Jul 2000 14:31:05 MET DST)
Organization: UNI2 Internet Kunde
X-MSMail-Priority: Normal
Reply-To: "Peter Smed Vestergaard" <xxxPeter_Vestergaard@saxotech.com>
NNTP-Posting-Date: Fri, 07 Jul 2000 14:31:05 MET DST
Newsgroups: comp.databases.oracle.misc


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@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>




