Donnerstag, 27. September 2018

ORA-01031: insufficient privileges from within a package

Symptom

You try to create tables from within a package, function or procedure. You run the package as the owner of the schema, the stored code is in that schema and the user has the create table privilege granted by a role.
Instead of the table being created, you get ORA-01031: insufficient privileges

Cause

Unknown quirk of Oracle?

Solutions

Make sure the security context of the stored code is authid current_user

Others

Creating views on tables that have been granted by role seems to cause the same problem.

Keine Kommentare:

Kommentar veröffentlichen