Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> ORA-01031: Create User in Procedure

ORA-01031: Create User in Procedure

From: Gregory A. Castle <gcastle_at_email.usps.gov>
Date: Thu, 15 Nov 2001 14:31:18 -0500
Message-ID: <c20b19b250725904347d32bf4cbd2817@spamfreenews.com>


[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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US