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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: strange problem

Re: strange problem

From: Pat Hildebrand <pat_at_ssc.upenn.edu>
Date: Mon, 14 May 2001 19:11:03 -0700
Message-ID: <F001.003032BF.20010514185025@fatcity.com>

>
> hi gurus,
> I am able to select from every hting from v$session at command line.
> but when i write in procedure it fails .... why.
>
> SQL> select osuser from v$session where username = 'IMAGE_INDEX' and rownum
> = 1;
>
> OSUSER
> ------------------------------
> MLOBO
> this is ok...
>
> CREATE OR REPLACE PROCEDURE n2 IS
> tmpVar varchar2(100);
> BEGIN
> select osuser into tmpvar from v$session where username = 'MLOBO'
> and rownum = 1;
> dbms_output.put_line ('name '||tmpvar);
> EXCEPTION
> WHEN NO_DATA_FOUND THEN
> Null;
> WHEN OTHERS THEN
> Null;
> END n2;
>
> this is failing says sys.V_$session must be declared.
> what could be reason ?
>

How was select on v$session granted to user who owns the procedure? If via a role this is the expected result.

                 Pat
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Pat Hildebrand
  INET: pat_at_ssc.upenn.edu

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Mon May 14 2001 - 21:11:03 CDT

Original text of this message

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