Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2004

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

  2. #2
    Join Date
    Feb 2004
    Dublin, Ireland
    as which user do you compile the package?
    to which schema do tables belong to?

    try to use <schema_name>.<table_name>

  3. #3
    Join Date
    Jan 2004
    Croatia, Europe
    Provided Answers: 5
    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.

  4. #4
    Join Date
    Sep 2004
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts