Oracle error
ORA-01031
ORA-01031: insufficient privileges
What usually causes it
A system or object privilege is missing. Privileges granted through roles don't count inside definer's-rights PL/SQL or views owned by another schema.
What to check first
List the user's privileges and grant the missing one directly to the user.
Scripts that help
- All privileges for one userPrompts for a username and lists the roles, system privileges and object privileges granted directly to it.
- Who has DBA, SYSDBA and powerful system privilegesNon-Oracle accounts and roles holding the DBA role or high-risk ANY privileges, then everyone in the password file. Worth reviewing every audit cycle.