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: Nathan D. Hughes <nhughes_at_well.com>
Date: 1997/12/12
Message-ID: <66s1qk$ocg$1@was.hooked.net>#1/1

"Ric Butler" <ricbutler_at_worldnet.att.net> writes:

>Why is it that from SQL*Plus I can successfully do:
 

>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

v$session is a public synonym for v_$session, a view owned by sys. You need to be granted explicit select on this view for your program to compile. (connect sys/manager; grant select on v_$session to foo).

--

Nathan D. Hughes <nhughes_at_well.com>
Computer Consultants of America, Inc.
Received on Fri Dec 12 1997 - 00:00:00 CST

Original text of this message

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