User gets "ORA-01031: insufficient privileges" for insert within a procedure. The same user can do t
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