-
How to "create user" in batch mode
I was asked to find out how to create multiple users in batch mode. Can someone tell me how to do it?
Our system uses sqlplus with Oracle 9i.
-
create a script to create users and run from command line using sqlplus.
sqlplus user/password@sidname @createscript
-
Thank you for replying.
Can a sql file(.sql) read from file? Also is it capable of loops?
I have a list of username and password in a text file, and I want to create account from this data. Do I have to write SQL statement for each account?
-
you won't be able to loop with standard SQL.
couple ways you might want to think about doing this.
1. you could create a procedure that would read an external table of users to create and then loop through the users and create the accounts.
2. you could create a shell script that could loop through the list and call sql/plus that would execute the command to create the user.
-
Thank you very much.
I could not figure out how to execute SQL commands from a shell script.
I ended up writing a C program that will write a SQL statement list into a text file. And from Sqlplus, executed the list. It wasn't too difficult, but I believe there must be better way to do this.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|