Help in Shell scripting to modify the User Creation script in oracle database.

Hi,

I have several users to create on my test Oracle database taking the scripts from the Production Oracle database. I have a separate text file where I have user-id and passwords maintained. I need help in writing a shell script to go thru the user creation scripts and replace VALUES '(redacted)' with the passwords maintained in the file based on the user-id. The password is encrypted when the script is extracted from the production database.

My passwords.txt will contain the following entry:

(redacted)

The extracted script from the production database is as follows:

CREATE USER "(redacted)" IDENTIFIED BY VALUES '(redacted)'
DEFAULT TABLESPACE "(redacted)"
TEMPORARY TABLESPACE "TEMP"
 PROFILE  "APPLICATION" 
/
 

After running the shell script the new file should contain the following:

CREATE USER "(redacted)" IDENTIFIED BY (redacted)
DEFAULT TABLESPACE "(redacted)"
TEMPORARY TABLESPACE "TEMP"
 PROFILE  "APPLICATION" 
/

Thanks a lot in advance

Ram.

Since you are using SQL I guess that you can do it using PL/SQL (or whatever SQL programming language you have there).
If not then you need to parse some files => thus learn about shell,awk,grep,etc.
You might use ANT as well...
There are many ways of getting this done. Do not expect that someone would give you a solution (at least without money). Anyway - this is a simple thing to do.