Re: Ora-942 in stored procedure

From: Frank <fbortel_at_home.nl>
Date: Mon, 10 Nov 2003 21:44:39 +0100
Message-ID: <boosso$5j3$1_at_news2.tilbu1.nb.home.nl>


DA Singh wrote:

> Hi,
> I have a stored procedure that tries to select from a table owned by
> another schema -
> create or replace procedure schema1.procedure1
> as
> insert into table2
> select col1, col2
> from schema2.table1;
> end;
> /
>
> And I get the Ora-942 error - Table or view does not exist.
> I can select from the table from the SQL prompt, when logged in as
> schema1.
> Are there some permissions that need to be set?
> The Oracle version is 9.2.0.3.0
> Thanks,
> D A Singh
As always - grant select on table1 to <owner of the procedure> roles are _not_ active in PL/SQL, they are in SQL.

-- 
Regards, Frank van Bortel
Received on Mon Nov 10 2003 - 21:44:39 CET

Original text of this message