- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: help needed for user creation in database
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 06:59 AM
тАО08-03-2004 06:59 AM
help needed for user creation in database
I have two files the first is the usernames and the second is the passwords. my users have a diferent password
any idea about generate the script
Thanks for all the responses
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-03-2004 07:53 AM
тАО08-03-2004 07:53 AM
Re: help needed for user creation in database
What I'd do is create a table with a number key, username and password fields. I'd load the username with a counter into the table. Then I'd update the records with the password using a counter. Then it would be a simple script like in your last post
spool creator.sql
select 'create user '||username_v||' identified by '||password_field||' default tablespace siebeldata temporary tablespace temp;',
'grant role_1, connect to '|| name
from my_name_table;
spool off
@@creator.sql
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-03-2004 08:17 AM
тАО08-03-2004 08:17 AM
Re: help needed for user creation in database
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-03-2004 10:33 AM
тАО08-03-2004 10:33 AM
Re: help needed for user creation in database
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-03-2004 06:35 PM
тАО08-03-2004 06:35 PM
Re: help needed for user creation in database
it seems like you have two posts for the same questions.
please refer to the other post.
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=654889
regards
Yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-03-2004 07:41 PM
тАО08-03-2004 07:41 PM