Database Administration (MOSC)

MOSC Banner

Creating user using procedure

edited Jun 29, 2013 2:44AM in Database Administration (MOSC) 10 commentsAnswered ✓
Hello All,

I'm trying to create and assign the required roles to the user using a stored procedure compilled in another user.

For example I have complied the below procedure in the user "parent" , when i call this procedure to create another user/ schema in the database the script fails with error messge "ORA-01935: missing user or role name"

Please note that user Parent has been graned all the below permission and create user and drop user privileges.

Procedure :

create or replace procedure cr_user (user_name in varchar2) is

out_username varchar2(300);
begin
execute immediate 'create user '||out_username||' identified by '||out_username||' default tablespace usr temporary tablespace temporary';

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