Need to create a user from procedure
577284Dec 23 2007 — edited Dec 23 2007Hi 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.