var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Package Compile - Table Permissions?
I have a PACKAGE BODY here that I'm trying to compile as a user. We'll call the user 'TOMMY' here for arguments sake, and the package we'll call 'PKG_COLLEGE_SEARCH'.
The PACKAGE header/definition compiles fine, but when I try to compile the PACKAGE BODY I get:
PL/SQL: ORA-00942: table or view does not exist
On two of the tables referenced by the PACKAGE, named ADDRESS and CLIENT.
This leads me to believe that there is a permissions problem. However, I can log in as TOMMY and run the very same statement by itself without encountering any problems!
So why doesn't the PACKAGE BODY see the table?
(BTW - I am a DBA with full SYS privileges, so I can change permissions and anything else at will.)
as which user do you compile the package?
to which schema do tables belong to?
try to use <schema_name>.<table_name>
How did you get privileges to work with these tables? Were you granted through a role, perhaps? If so, this might be a problem as PL/SQL procedures disable all roles when they are run (issuing "the very same statement" in SQL*Plus won't raise error). Solution is in granting privileges directly to the user instead of using roles.
yes, that's it. ROLES don't apply to PACKAGES, PROCEDURES or FUNCTIONS.
so the user needs explicit OBJECT PRIVILEGES on these tables.
granting the SYSTEM PRIVILEGE "SELECT ANY TABLE" works as well, but gives the user too much power.
thanks for the responses.