Search code examples
sqloracleplsqloracleforms

ora-04067 not executed package does not exist


While loading oracle form application, users are getting the below error ora-04067 not executed package "XYZ" does not exist

I have checked the package and package body (XYZ) and it is present and valid. I am able to execute the package from sqlplus and sql developer. However when other users login using their credentials, they are getting this error. When we provide execute permission to individual users, it works but that is not the correct way. What else can be checked why this error is occurring?


Solution

  • When we provide execute permission to individual users, it works but that is not the correct way

    What makes you think so? Which way would - in your opinion - be the correct way, then?

    In Oracle, everything is forbidden by default. If you want to allow something, you have to allow it explicitly, and that's by granting privileges.

    You can, though, choose whether

    • you'll do that to every user separately, or
    • will you create role(s), grant privileges to it (the role), and then grant role to users

    There's yet another alternative, but keep in mind that this might not be the best one: granting privileges to public. Do you really want absolutely anyone access your objects, execute your procedures?

    Also, unless you create synonyms to objects you've granted privileges on, you'll have to reference them by preceding their names with the owner name.