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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Problem with the v$session view.

Re: Problem with the v$session view.

From: Bill Petty <pettyb_at_cadvision.com>
Date: 1997/12/12
Message-ID: <34917c08.0@news.cadvision.com>#1/1

"Ric Butler" <ricbutler_at_worldnet.att.net> writes: > Why is it that from SQL*Plus I can successfully do:

Hi Ric:

 The problem here (catches me all the time) is that the view must be granted directly to the procedure creator, Role authorities do not apply to stored procedures.
 In my humble opinion this is a shortcoming in Oracle; however, others seem to accept it as reasonable.

Good Luck.

Bill
>
> SELECT username,osuser,program,machine
> FROM v$session
> WHERE audsid = USERENV('SESSIONID')
>
> But if I do a similar select into PL/SQL variables in a stored procedure
> (while
> logged on as the same Oracle user) I get the following
> compile error:
>
> PLS-00201: identifier 'SYS.V_$SESSION' must be declared
>
>
> I'm guessing that it's some permission problem but I haven't
> been able to figure it out. Any ideas ?
>
> Thanks
>
> Ric
>
>
>
Received on Fri Dec 12 1997 - 00:00:00 CST

Original text of this message

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