Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Need to create a user from procedure

577284Dec 23 2007 — edited Dec 23 2007
Hi to all,

I need to create a user from oracle stored procedure. i am able to create a proceure successfully, when i am executing the procedure i cant able to successfully run it. it is throwing insufficient privileges. i tried to run the procedure from system user also.

The below one is the procedure.


create or replace procedure sp_createsuser(username varchar2)
as
begin
execute immediate 'create user ' || username || ' identified by ' || username;
end;


the code is parsed successfully and created without any errors
when trying to executing it throwing error as insufficient privileges
the user is dba privileged and tried this procedure to execute from the system user also, getting the same output.


I need to know whether it is possible to create user from a procedure, package or a trigger.

Thanks in advance.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 20 2008
Added on Dec 23 2007
5 comments
664 views