Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Error creating package
Andy Rigby wrote:
>
> SQL> create or replace package body adoDemo
> 2 as
> 3 procedure getEmployees(p_cursor out rc_emp) is
> 4 begin
> 5 open p_cursor for select ename from MYSCHEMA.TBL19;
> 6 end getEmployees;
> 7 end adoDemo;
> 8 /
>
> There are 2 errors which appear:
>
> 5/25 PL/SQL Statement ignored
> 5/43 PLS-00201: identifier 'MYSCHEMA.TBL19' must be declared
>
> But MYSCHEMA.TBL19 exists and I can select from it (select * from
> MYSCHEMA.TBL19) so I cannot see where the problem lies.
>
Hello Andy,
this sounds to me like a FMF (frequently made fault :-).
In PL/SQL roles do not work so you have to grant the select privilege
directly to the user creating the package.
Hope that helps,
Lothar
-- Lothar Armbrüster | la_at_oktagramm.de Hauptstr. 26 | la_at_heptagramm.de D-65346 Eltville | lothar.armbruester_at_t-online.deReceived on Thu Feb 14 2002 - 12:59:05 CST