Using environment variables in RMAN command line
NevinJun 12 2012 — edited Jun 13 2012I'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?