- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Creating 800 users in oracle
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-03-2004 03:54 AM
тАО08-03-2004 03:54 AM
create user cap101 identified by cap101
default tablespace siebeldata
temporary tablespace temp;
grant sse_role,create session to cap101;
and is the same for cap102 to cap900
you know any script for run fast this creation;
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-03-2004 04:00 AM
тАО08-03-2004 04:00 AM
Solutionwhile read -r username
do
sqlplus '/as sysdba' << EOF
create user cap101 identified by $username
default tablespace siebeldata
temporary tablespace temp;
grant sse_role,create session to $username;
EOF
done < userlist
This methodology might work.
all you need is a text list of users one per line in the file userlist.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-03-2004 04:10 AM
тАО08-03-2004 04:10 AM
Re: Creating 800 users in oracle
how I can run your instructions?
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-03-2004 04:12 AM
тАО08-03-2004 04:12 AM
Re: Creating 800 users in oracle
I would suggest user only one session
Generate the SQL script 1st :
#!/bin/sh
echo " " | awk '{
for(i=101;i < 901;i++) {
printf("create user cap%d identified by cap%d default tablespace siebeldata tem
porary tablespace temp;\n",i,i);
printf("grant sse_role,create session to cap%d;\n",i);
}
}'
then use outpout as SQL script
sqlplus
Regards,
Jean-Luc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-03-2004 04:30 AM
тАО08-03-2004 04:30 AM
Re: Creating 800 users in oracle
let's do it with SQL programming
create the following SQL script and save output file.
Run the output file to create users :
##################################
set serveroutput on;
declare
VAR2 number;
begin
-- server output buffer resize :
dbms_output.enable(20000);
FOR VAR2 in 101..120 LOOP
dbms_output.put_line('create user cap'||VAR2||' identified by cap'||VAR2||' default tablespace siebeldata temporary tablespace temp;');
dbms_output.put_line('grant sse_role,create session to cap'||VAR2||' ;');
END LOOP;
end;
/
##################################
change upper limit accordingly.
note : you may have to change dbms_output.enable limit as well.
Regards,
Jean-Luc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-03-2004 05:41 AM
тАО08-03-2004 05:41 AM
Re: Creating 800 users in oracle
If i have a list of users how i can create this users whit te same password an the same grant for all.
example of my users:
joudart
aguerrero
evalle
leljure
.
.
.
etc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-03-2004 06:01 AM
тАО08-03-2004 06:01 AM
Re: Creating 800 users in oracle
a) Load you names into an Oracle table then
spool creator.sql
select 'create user '||name||' identidied by password default tablespace siebeldata temporary tablespace temp;',
'grant role_1, connect to '|| name
from my_name_table;
spool off
@@creator.sql
b) Use your favorite programming language to do the same thing
Read record
create sql statement
run sql statement
loop
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-03-2004 06:39 AM
тАО08-03-2004 06:39 AM
Re: Creating 800 users in oracle
if I have a file with the usernames and other file with the passwords
How I can create the users
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-03-2004 09:05 AM
тАО08-03-2004 09:05 AM
Re: Creating 800 users in oracle
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=655054
There I answerred:
Hmmm, scary thought to have two seperate lists for that. They could not generate them into one list?
Anyway... this problem is much similar to:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=650699
One potential solution in awk:
awk '{getline pass < "passwords.dat"; print "create user",$1,"identified by",pass,"default blah blah..."}' usernames.dat
So here the main awk loop reads "usernames" and feeds them into $0, $1 and so on.
THen for every record read, we start py reading a line from "passwords" into symbol pass and print that along with the sql text and $1 (the first and only field from "usernames".
Good luck.
Hein
[Moderator... delete thread 655054 ? ]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-03-2004 11:09 AM
тАО08-03-2004 11:09 AM
Re: Creating 800 users in oracle
Thank you
I execute the next:
awk '{getline pass < "passwords.dat"; print "create user",$1,"identified by",pas
s,"default tablespace siebeldata temporary tablespace temp; grant sse_role,creat
e session to",$1,";"}' usernames.dat > /tmp/users/yo.sql
but I can't execute the yo.sql file
The yo.sql file is:
create user CAP101 identified by DEMO1 default tablespace siebeldata temporary tablespace temp; grant sse_role,create session to CAP101 ;
I need insert a line before the grant
how I can put this line?