3 Replies Latest reply: Apr 18, 2013 2:46 AM by DB RSS

    I am using Hp-ux 11.in my OS i scheduled RMAN cron jobs.but it was not exec

    DB
      Hi All,

      I am using Hp-ux 11.in my OS i scheduled RMAN cron jobs.but it was not executed timely.

      Please help me.

      regards,
      Db

      Edited by: DB on Apr 8, 2013 1:22 PM
        • 1. Re: I am using Hp-ux 11.in my OS i scheduled RMAN cron jobs.but it was not exec
          alvaromiranda
          hello

          you need to provide more detail, is very difficult to guess what can be wrong.

          So, as I have to take a guess, I will say it's because cron is executed in a new shell, where ORACLE_SID, ORACLE_HOME and PATH are not set.

          you usually create an script, that set ORACLE_SID, ORACLE_HOME and PATH and you execute that script from cron

          Alvaro.
          • 2. Re: I am using Hp-ux 11.in my OS i scheduled RMAN cron jobs.but it was not exec
            mseberg
            Hello;

            Would expect a cron entry like : ( daily at 6PM )
            00 18 * * 0-6 /u01/app/oracle/dba_tool/PRIMARY/db_rman_full.sh > /tmp/PRIMARY_rmanfull.out
            Permissions on the script of 744 ( you and test and change as needed by your security )

            and either ENV variables inside the script or a call to an ENV script

            PRIMARY.env file Example
            export ORACLE_BASE=/u01/app/oracle
            
            export ORACLE_HOME=/u01/app/oracle/product/11.2.0.3
            
            export ORACLE_SID=PRIMARY
            
            
            export ULIMIT=unlimited
            
            export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
            
            export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/network/lib
            
            export LIBPATH=$LD_LIBRARY_PATH:/usr/lib
            
            export TNS_ADMIN=$ORACLE_HOME/network/admin
            
            PATH=$ORACLE_HOME/bin:$ORACLE_BASE/dba_tool/bin:/bin:/usr/bin:/etc:/etc/X11/xserver/C:.
            
            
            export PATH
            Call from RMAN script example
            #
            # Set the Environmental variable for the instance
            #
            . /u01/app/oracle/dba_tool/env/${DBNAME}.env
            #
            #
            HP-UX UNIX Cron Services

            http://www.cyberciti.biz/faq/hp-ux-unix-cron-job-configuration-tutorial/

            http://johnmeister.com/CS/UNIX/HP-UX/crontab-man.html

            http://ninenok.blogspot.com/2009/05/crontab-hp-ux.html

            http://h30499.www3.hp.com/t5/System-Administration/how-to-enable-the-crontab-for-user-in-hpux/td-p/5234822

            Best Regards

            mseberg