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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Adding Users

Re: Adding Users

From: Allen Kirby <akirby_at_att.com>
Date: 1997/01/30
Message-ID: <32F0BC14.1E43@att.com>#1/1

Sanjeev Parikh wrote:
>
> Priya Tantry <tantry_at_cc.uq.oz.au> wrote in article
> <32ED346D.2781E494_at_cc.uq.oz.au>...
> > What is the best way of adding users to Oracle in bulk on Unix?
> >

 <snip>
>
> Well the bests ways is to create a pro*c program that requests user name
> and passwords

Actually, you can pipe a file containing the ids you want added into an awk script which will generate the sql statements which can then be piped into a sqlplus script. This will avoid writing c code and compiling and can be run batch. Here is a simple example of this technique (file contains one userid per line):

cat file | awk '{ print "alter user ",$1," identified by default_pw;" } END { print "exit;" }' | sqlplus -silent scott/tiger

Obviously this doesn't add users but the technique is the same. Hope this helps.

-- 
---
Allen Kirby			AT&T ITS Production Services
akirby_at_att.com			Alpharetta, GA.
Received on Thu Jan 30 1997 - 00:00:00 CST

Original text of this message

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