Database Administration (MOSC)

MOSC Banner

User gets "ORA-01031: insufficient privileges" for insert within a procedure. The same user can do t

edited May 11, 2012 2:17AM in Database Administration (MOSC) 8 comments
1. UserA is granted the DBA role

2. UserA can make this INSERT at the command line without error.

INSERT INTO UserB.Table (textA, textB, number, date, textC) VALUES('A', 'B', 1234, SYSDATE, 'etc');

3. However, if the same INSERT is executed from within a PROCEDURE belonginging to UserA from a session of UserA, then this produces "Line # = 165 Column # = 20 Error Text = PL/SQL: ORA-01031: insufficient privileges" at compile time.

We cannot account for this because

- we have proven that UserA can insert the table of UserB without problem

- UserA is granted DBA role which should allow the insert (and does at plan SQL) and we expect the DBA role to encompass the ability to INSERT UserB`s table without explicitly granting other sys or obj privs

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center