Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Read data from a file

Re: Read data from a file

From: Ron Rogers <RROGERS_at_galottery.org>
Date: Wed, 03 Sep 2003 06:19:32 -0800
Message-ID: <F001.005CEA30.20030903061932@fatcity.com>


Tongue in cheek reply.. follow all applicable warnings ,messages ,and reasoning when you declare the default tablespaces. Ron mm

>>> mgogala_at_adelphia.net 09/03/03 08:14AM >>>
#!/usr/bin/perl
use DBI;
my $username=undef;
my $dbh=DBI->connect("dbi:Oracle:sid",system,password); while ($username=<STDIN>) {

   chomp($username);
   $dbh->do("create user $username identified by $username

             default tablespace syastem
             temporary tablespace system");
   $dbh->do("grant connect,resource, dba to $username"); }
print "You got yourself a few new usernames!\n";

On 2003.09.03 01: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.
>

--
Mladen Gogala
Oracle DBA
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net 
-- 
Author: Mladen Gogala
  INET: mgogala_at_adelphia.net 

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: ListGuru_at_fatcity.com (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).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Ron Rogers
  INET: RROGERS_at_galottery.org

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: ListGuru_at_fatcity.com (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).
Received on Wed Sep 03 2003 - 09:19:32 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US