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: <Jared.Still_at_radisys.com>
Date: Wed, 03 Sep 2003 10:59:34 -0800
Message-ID: <F001.005CEA80.20030903105934@fatcity.com>


How embarrasing!

Someone else suggested a Perl solution.

I did think of doing so, but then didn't do so for some reason.

And of course, there are some scripts for that in "Perl for Oracle DBA's" . :)

Jared

Mladen Gogala <mgogala_at_adelphia.net>
Sent by: ml-errors_at_fatcity.com
 09/03/2003 05:14 AM
 Please respond to ORACLE-L  

        To:     Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com>
        cc: 
        Subject:        Re: Read data from a file


#!/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: 
  INET: Jared.Still_at_radisys.com

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 - 13:59:34 CDT

Original text of this message

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