Monday, May 23, 2016

rman shell script but not connecting to recovery catalog

I have one RMAN backup script works fine , but when running for a 12c.1 database, it keeps showing me below in logfile

"using target database control file instead of recovery catalog
Report of database schema for database with db_unique_name DEV"


And this the working fine shell function.


func_cold_db_backup() {
${ORACLE_HOME}/bin/rman target /  cmdfile='/oracle/UAT/ops/exec/cold_backup.rman' log=$logfile <>$logfile 2>&1
${ORACLE_HOME}/bin/rman target /   log=$logfile <>$logfile 2>&1
connect catalog rman/pwdxxxxx@RCAT
@/oracle/UAT/ops/exec/cold_backup.rman
EOF


When manually try the command , it works fine and shows me connected to RCAT.

${ORACLE_HOME}/bin/rman target /  catalog rman@RCAT
connected to target database: UAT (DBID=27281018)
connected to recovery catalog database


So the only difference is cmdfile parameter.

As such, I rewrite the function and works "better" now for this database.


func_cold_db_backup() {
${ORACLE_HOME}/bin/rman target /   log=$logfile <>$logfile 2>&1
connect catalog rman/pwdxxx@RCAT
@/oracle/UAT/ops/exec/cold_backup.rman
EOF