Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: select on V$SESSION from PL/SQL

Re: select on V$SESSION from PL/SQL

From: Andrew Hardy <nobody_at_spam.from.news.AdvanticaTech.com>
Date: Mon, 4 Feb 2002 09:17:50 -0000
Message-ID: <a3ljk7$hn9$1@sun-cc204.lut.ac.uk>


Sounds like a permissions problem on the SYS.V_$SESSION - the user running the procedure needs to have permission assigned directly to them and not just to one of their roles. Role privileges are not passed on to running PL/SQL. Andy

"Patrick J." <patrickREMOVE.jTHIS_at_kneip.com> wrote in message news:3c5e506f_1_at_news.vo.lu...
> Hi,
>
> When I run the following sql statement ...
> select program from v$session
> ... everything works well.
>
> But when I include the following block in a PL/SQL package ...
> begin
> select program
> into l_prg
> from v$session
> where audsid = l_adtsss;
> exception
> when NO_DATA_FOUND then
> l_prg := 'Unknown';
> end;
> ... I receive the error message: PLS-00201: identifier 'SYS.V_$SESSION'
must
> be declared
>
> The user issuing the sql statement is the owner of the package, so I don't
> understand why it works in the first case and not in the second.
>
> Thanks for your help,
>
> Patrick J.
>
>
Received on Mon Feb 04 2002 - 03:17:50 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US