"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 <
${ORACLE_HOME}/bin/rman target / log=$logfile <
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.
${ORACLE_HOME}/bin/rman target / log=$logfile <
connect catalog rman/pwdxxx@RCAT
@/oracle/UAT/ops/exec/cold_backup.rman
EOF