Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> ORA-01031: Create User in Procedure
[This followup was posted to comp.databases.oracle.server and a copy was
sent to the cited author.]
I have the following procedure that is executed from an insert trigger on an employee table. This procedure works correctly if I insert the data logged in as sys and with sysdba rights. With any other user, I receive ORA-01031: insufficent privileges. I can execute the statement in the procedure directly as another user without any problem. Any suggestions as to what privilege I need to have to run this procedure.
create or replace procedure cr8user (cuser IN varchar2, cpass IN
varchar2) is
begin
execute immediate 'create user ' || cuser || ' profile default
identified by ' || cpass || ' default tablespace users temporary tablespace temp account unlock';
end cr8user;
cuser and cpass are passed by the insert trigger. I am using Oracle 8i, 8.1.5.
Thanks in Advance for any help.
Greg Received on Thu Nov 15 2001 - 13:31:18 CST