4 Replies Latest reply: Oct 2, 2013 7:44 AM by Anar Godjaev RSS

    RMAN Script doesn't run in Crontab

    okKarol

      Hi Guys,

      I've this simply issue.

      2 Scripts:

      -rwxrwxrwx 1 oracle oinstall    292 2013-10-01 17:15 crt_stby_CMOVP.sh

      -rw-r--r-- 1 oracle oinstall    180 2013-10-01 16:11 crt_stby_CMOVP.rcv

       

      ---- Details of crt_stby_CMOVP.sh

      oracle@cmovel-db01:~/scripts$ cat crt_stby_CMOVP.sh

      #!/bin/sh

      export ORACLE_HOME=/app/oracle/product/11.2.3

      rman target sys/mkesh01@cmovp catalog rman/rman@rman auxiliary  sys/mkesh01@cmovpdg  cmdfile=/home/oracle/scripts/crt_stby_CMOVP.rcv log='crt_stby_CMOVP.log'

       

      ---- Details of crt_stby_CMOVP.rcv

      run

      {

      allocate channel prm1 type disk;

      allocate auxiliary channel stby1 type disk;

      DUPLICATE TARGET DATABASE

        FOR STANDBY

        FROM ACTIVE DATABASE

        DORECOVER

        NOFILENAMECHECK;

      }

       

      ---- Crontab :

      20 17 * * * /home/oracle/scripts/crt_stby_CMOVP.sh >>/dev/null 2>&1

       

      Issue :

      Nothing happens

       

      But when I execute the script manually : It runs !!!

      oracle@cmovel-db01:~/scripts$ ./crt_stby_CMOVP.sh

      RMAN> 2> 3> 4> 5> 6> 7> 8> 9> 10> 11> 12>

       

      If I check the log everything is working fine

       

      Any idea what might be wrong !!!!

      Txs for your help