Re: Script for creating users anyone?

From: Tony Noble <tnoble_at_mt.gov>
Date: 1996/08/22
Message-ID: <4vidlm$72u_at_server.umt.edu>#1/1


In article <4va7mv$4k5$1_at_mhadf.production.compuserve.com>, 103114.2151_at_CompuServe.COM says...
>
>Neville,
>
>Do you have anyone that can write shell scripts?? You could write a script
>to read your text file then pass the user name to Oracle.
>
> ie. sqlplus user/password _at_add_user "value"
>
>Within the SQL script you would replace any user name references with &1
>which would pull in the OS "value."
>
>If you need more information, send me an e-mail.
>
>Mike
>

Why write a shell script...
What if you don't have an operating system script language... What if you have to support multiple operating systems...

Use SQL*Loader to load your text file of names into the database then use SQL to generate the SQL to create the accounts.

from sqlplus, something like this

set heading off
set feedback off
set termout off
set echo off
spool users.txt
select 'CREATE USER '||ID_NAME||' IDENTIFIED BY '||PASSWORD|| ' DEFAULT TABLESPACE STUDENTS_TS TEMPORARY TABLESPACE TEMP_TS;' from temp_students
order by id_name
/
spool off
_at_users.txt

As i saw mentioned in another post, pay attention to roles and profiles, especially with large groups of neophyte users.

-- 
Tony Noble
tnoble_at_mt.gov
Opinions expressed do not necessarily reflect those of my employer.
Received on Thu Aug 22 1996 - 00:00:00 CEST

Original text of this message