Skip to Main Content

SQL & PL/SQL

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!

Converting sql-script to PL/SQL

638493May 12 2008 — edited May 12 2008
Hello,

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.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 9 2008
Added on May 12 2008
8 comments
556 views