I have a cron job scheduled as below.what it will do is invoke RMAN in Oracle and then clear all the achivelogs in the oracle database which are 1 day old. But the issue is that it is not getting executed through the cron job. but if I execute the same script from the prompt it nicely delete the logs through RMAN. Please help me in sheduling this script...
05 07 * * * /x01/rman_backup/mahesh/logde.sh
contents of the script as follows
#!/bin/bash
/x01/oracle/app/oracle/product/11.2.0/db_1/bin/rman cmdfile=/x01/rman_backup/mahesh /logdelete.rcv
The Content of the logdelete.rcv is as below
connect target /
run
{
delete archivelog all completed before 'trunc(sysdate)';
crosscheck archivelog all;
}
exit;
Please someone help me in scheduling this. I'm using this in SUSE Linux version 11