Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Using environment variables in RMAN command line

NevinJun 12 2012 — edited Jun 13 2012
I'm running Oracle 11gR2 and working in a Solaris 10 environment.

I am trying to run the rman command by connecting to the target, auxiliary, and catalog by catting out the contents of password files where I have my connect strings stored for each database. Also in there I am trying to use environment variables to reference each database.

rman target "`cat ${HOME}/password_dir/prod_connect.txt`@${PROD_DB}" auxiliary "`cat ${HOME}/password_dir/stage_connect.txt`@`${STAGE_DB}`" catalog "`cat ${HOME}/password_dir/rman_catalog_connect.txt`@${RMAN_CATALOG_DB}"


The end result I need is:

rman target "username/password@db" auxiliary "username/password@db" catalog "username/password@db"


Is this possible?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 11 2012
Added on Jun 12 2012
5 comments
1,833 views