Database Administration (MOSC)

MOSC Banner

ORA-01031 insufficient privileges

edited Dec 12, 2013 10:15AM in Database Administration (MOSC) 21 comments
Dear Oracle,

After userA creates a procedure and grants to userB, the userB cannot use the procedure.

It was on an Oracle 10.2.0.4 for Windows32bit. It works at another Oracle database (11g R1 on Windows 2008 64bit) . Thank you!

1. userA on SQL*Plus

CREATE OR REPLACE PROCEDURE proc1 (p_user IN VARCHAR2, p_pass IN VARCHAR2) IS
BEGIN
execute immediate 'alter user '||p_user||' identified by '||p_pass;
END;

create user userB identified by userB_pwd;
grant connect,resource to userB;
grant execute on proc1 to userB;

2. userB on SQL*Plus

execute userA.proc1('USERB', 'new_pwd');
BEGIN userA.proc1('USERB, 'new_pwd); END;

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