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.