SET VERIFY OFF
ACCEPT sys_pass PROMPT 'Please enter password for user SYSTEM : ' hide
ACCEPT db_name PROMPT 'Enter database name or connection string. Default is [LOCAL] : '
REM CONNECT
CONNECT SYSTEM/&sys_pass@&db_name
ACCEPT u_name PROMPT 'Enter new user name: '
ACCEPT u_pass PROMPT 'Enter password: ' HIDE
ACCEPT def_tbs PROMPT 'Enter default tablespace: '
ACCEPT tmp_tbs PROMPT 'Enter temporary tablespace: '
ACCEPT u_quota PROMPT 'Enter user quota (e.g. 100K, or 1M, or UNLIMITED): '
ACCEPT quota_tbs PROMPT 'On tablespace: '
CREATE USER &u_name
IDENTIFIED BY &u_pass
DEFAULT TABLESPACE &def_tbs
TEMPORARY TABLESPACE &tmp_tbs
QUOTA &u_quota ON "a_tbs;
GRANT CONNECT, RESOURCE TO &u_name;
EXIT;
WHENEVER SQLERROR EXIT