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: Paul Brewer <paul_at_paul.brewers.org.uk>
Date: Tue, 5 Feb 2002 18:38:59 -0000
Message-ID: <3c60700a_3@mk-nntp-1.news.uk.worldonline.com>


To expand slightly:
Patrick, you will need to connect as SYS and grant select on V_$SESSION (note, *not* V$SESSION - that's just a synonym for the view) to the package *owner*. That will enable package creation. The package owner then needs to grant execute on the package to whoever will be running it.

HTH,
Paul

"Andrew Hardy" <nobody_at_spam.from.news.AdvanticaTech.com> wrote in message news:a3ljk7$hn9$1_at_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 Tue Feb 05 2002 - 12:38:59 CST

Original text of this message

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