| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Problem with the v$session view.
"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
![]() |
![]() |