Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: select on V$SESSION from PL/SQL
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
![]() |
![]() |