Return-Path: <root@fatcity.cts.com>
Received: from newsfeed.cts.com (newsfeed.cts.com [209.68.248.164])
 by naude.co.za (8.11.2/8.11.2) with SMTP id g2LGon903543
 for <oracle-l@naude.co.za>; Thu, 21 Mar 2002 11:50:49 -0500
Received: from fatcity.UUCP (uucp@localhost)
 by newsfeed.cts.com (8.9.3/8.9.3) with UUCP id IAA52686;
 Thu, 21 Mar 2002 08:54:12 -0800 (PST)
Received: by fatcity.com (26-Feb-2001/v1.0g-b70/bab) via UUCP id 0042FD52; Thu, 21 Mar 2002 08:08:28 -0800
Message-ID: <F001.0042FD52.20020321080828@fatcity.com>
Date: Thu, 21 Mar 2002 08:08:28 -0800
To: Multiple recipients of list ORACLE-L <ORACLE-L@fatcity.com>
X-Comment: Oracle RDBMS Community Forum
X-Sender: =?iso-8859-1?q?Connor=20McDonald?= <hamcdc@yahoo.co.uk>
Sender: root@fatcity.com
Reply-To: ORACLE-L@fatcity.com
Errors-To: ML-ERRORS@fatcity.com
From: =?iso-8859-1?q?Connor=20McDonald?= <hamcdc@yahoo.co.uk>
Subject: Re: Error in procedure with dba_users
Organization: Fat City Network Services, San Diego, California
X-ListServer: v1.0g, build 70; ListGuru (c) 1996-2001 Bruce A. Bergman
Precedence: bulk
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

You must grant select on DBA_USERS *directly* to the
user creating the procedure - not via a role.

hth
connor

 --- com.banilejas@codetel.net.do wrote: > Hi list,
> 
> I have this procedure under the system user, and
> when try to create it
> I get an error 
> 
> CREATE OR REPLACE PROCEDURE GENERAR_ESTADISTICAS AS
>    CURSOR ESQUEMAS IS
>        SELECT USERNAME ESQUEMA
>           FROM SYS.DBA_USERS
>        WHERE
>           USERNAME IN ('RAMON', 'SCOTT');
> BEGIN
>    FOR E IN ESQUEMAS
> LOOP
>    DBMS_UTILITY.ANALYZE_SCHEMA(E.ESQUEMA,
> 'COMPUTE');
> END LOOP;
> END;
> 
> 3/8      PL/SQL: SQL Statement ignored
> 4/16     PLS-00201: identifier 'SYS.DBA_USERS' must
> be declared
> 11/4     PL/SQL: Statement ignored
> 11/32    PLS-00364: loop index variable 'E' use is
> invalid
> SQL> 
> 
> Any help .
> 
> TIA 
> 
> Ramon E. Estevez
> -- 
> Please see the official ORACLE-L FAQ:
> http://www.orafaq.com
> -- 
> Author: 
>   INET: com.banilejas@codetel.net.do
> 
> 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@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). 

=====
Connor McDonald
http://www.oracledba.co.uk (mirrored at 
http://www.oradba.freeserve.co.uk)

"Some days you're the pigeon, some days you're the statue"

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: =?iso-8859-1?q?Connor=20McDonald?=
  INET: hamcdc@yahoo.co.uk

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@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).

