Converting sql-script to PL/SQL
638493May 12 2008 — edited May 12 2008Hello,
I want to create a Procedure under a schema using OEM. So that I can grant execute permissions on this procedure to others. This is the sql script I am using. I tested the sql-script it is working in sql*plus.
Create user script
prompt 'Create user for TEST instance'
prompt
ACCEPT your_id CHAR prompt 'Enter your User Id: ';
ACCEPT yourpwd CHAR prompt 'Enter your password: ' HIDE;
ACCEPT user_id CHAR prompt ' Enter User Id to be created: ';
prompt
spool /u00/app/oracle/admin/TEST/logs/create_TESTuser_&user_id.log
connect &your_id/&yourpwd@TEST
create user &user_id PROFILE DEFAULT identified by welcome
default tablespace users
temporary tablespace temp
quota unlimited on users;
grant create session to &user_id;
alter user &user_id password expire;
spool off;
Thanks,
Read.