You're going to need some passwords in that file as well.
You could always use a password generator, but as they say,
that is left as an exercise for the reader.


--- users.txt -- username password -----
scott tiger
joan arc
eric viking
---------------------

---- create_user.sql -------- username password
--- modify as needed
connect system/manager
create user &&1 identified by &&2 
  default tablespace users
  temporary tablespace temp;

alter user &&1 quota unlimited on users;

grant resource, connect to &&1;

revoke unlimited tablespace from &&1
----------------------------------------

---- create_user.sh ------------------
unset SQLPATH
while read line
do
   username=$(echo $line | awk '{ print $1 }' )
   password=$(echo $line | awk '{ print $2 }' )
   sqlplus -s @create_user.sql $username $password
done < users.txt
---------------------------

HTH

Jared




On Tue, 2003-09-02 at 22:34, setiady wrote:
> MessageHi All,
>     I wonder if it is possible for me to execute a script file to create user while 
> I have another file (a text file) consisting the names of the users I want to 
> create. Assuming that all the users are having the same privileges, what is the 
> procedure to read the names from the other file? Thank you.



-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Jared Still
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to