Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-00942 error in package compilation

513225Nov 25 2007 — edited Nov 26 2007
Hi all:

I have two schemas in my database (Oracle10g). I have got some tables in schema1. I have given grants (select, insert, update, delete) to a role and have attached that role to schema2. Also, I have created synonyms for all those tables in schema2.

When I login to DB through schema2, I am able to do all my operations on the table of schema1. But when I try to build a package involving any of those tables, it throws ORA-00942: table or view does not exist.

But if I run "grant select on <table> to schema2;" and recompile the package, it goes through without any error.

My question: Is there any way wherein I can get over this problem by still using role to manage my grants? or to create a package, is it necessary to have direct select grants?

regards,
Ankit.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 24 2007
Added on Nov 25 2007
5 comments
568 views