CRON ERROR.........
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: CRON ERROR.........

  1. #1
    Join Date
    Sep 2000
    Posts
    31

    Angry

    HI GURUS,

    I HAVE NO PROBLEM TO SH A UNIX SHELL SCRIPT TO EXPORT AN ENTIRE VERSION OF MY ORACLE DATABASE. HOWEVER, I GOT AN ERROR TO CRON THE SAME SHELL SCRIPT TO AUTOMATE MY EXPORT DATABASE TASK.

    CRON COMMAND:

    0 6 * * 1-5 /usr/export/ORAEXP
    ***** ERROR MESSAGE BEGINs *********
    Date: Sat, 11 Aug 2001 08:06:00 -0700 (PDT)

    From: oracle
    To: oracle
    Subject: Output from "cron" command
    Content-Type: text
    Content-Length: 745
    Your "cron" job on prod-sun

    /usr/export/ORAEXP

    produced the following output:

    ORAEXP: prod export started.

    ORAEXP: prod export started.

    Message 206 not found; No message file for product=RDBMS, facility=EXP: Release 7.1.4.1.0 - Production on Sat Aug 11 08:05:00 2001


    Copyright (c) Oracle Corporatio

    EXP-00008: Message 8 not found; No message file for product=RDBMS, facility=EXP

    Error while trying to retrieve text for error ORA-02701

    EXP-00222: Message 222 not found; No message file for product=RDBMS, facility=EXP

    EXP-00000: Message 0 not found; No message file for product=RDBMS, facility=EXP

    ORAEXP: Export of prod failed.

    ORAEXP: ORAEXP process aborting

    ORAEXP: Export of prod failed.

    ORAEXP: ORAEXP process aborting


    ********ERROR MESSAGE END *************




    I ALSO COULD NOT CRON ANOTHER JOB WHICH DOES A FTP A EXPORT FILE TO ANOTHER SERVER, EVENTHOUGH I CAN RUN IT @ SHELL :
    $sh /usr/bk/cold_bk

    I HAVE A CORRECT PATH AND FILENAME. I EVEN RAN SUCCESSFULLY BY USING

    $sh /usr/export/ftp_exp

    the export_script is executable. It means:

    $ls -l /usr/export/ftp_exp
    -rwxr-xr-x /usr/export/ftp_exp

    ******error message **************
    Date: Sat, 11 Aug 2001 08:46:00 -0700 (PDT)
    From: oracle
    To: oracle
    Subject: Output from "cron" command
    Content-Type: text
    Content-Length: 130


    Your "cron" job on prod-sun
    /usr/export/ftp_exp
    produced the following output:


    sh: /usr/export/ftp_exp: not found

    ******error message end**************



    Please advise what was missing. It would be appreciated very much.


    Thanks



  2. #2
    Join Date
    Oct 2000
    Location
    Saskatoon, SK, Canada
    Posts
    3,925
    Here the problem could be that your oracle home is not getting set properly. One advice would be write a shell script where it would set your oracle_home, ld_library_parth and etc, then invoke the exp functionality from $ORACLE_HOME/bin/exp . Then it would work fine. Some or the other the priblem seems like your cron job couldn't see the oracle_home properly.

    Check that out.

    Sam
    Thanx
    Sam



    Life is a journey, not a destination!


  3. #3
    Join Date
    Mar 2001
    Posts
    635
    Hi

    Set the following in ur shell script

    export ORACLE_HOME=pathofuroraclehome

    export ORACLE_SID=youroraclesid

    And I would suggest you use

    rcp

    for remote file copying it is much easier

    Regards,

    Santosh

  4. #4
    Join Date
    Sep 2000
    Posts
    31

    Wink

    Hi Gurus,
    I followed your instructions and my cronjob works fine. I thank all of you for helping me. Santosh, it would be great if you could send me a sample script that using rcp to transfer files from one to another. ( if you have one).

    Thanks,

    jn

  5. #5
    Join Date
    Mar 2001
    Posts
    635
    Hi

    Here is an example of rcp

    Run the command from your source machine from where you are copying the file a.txt

    $ rcp a.txt targetmachinename:/var/opt/oracle/home

    The file gets copied from the source machine to target machine in the following directory

    /var/opt/oracle/home

    Read for more Info on rcp by using

    $ man rcp

    Hope this helped

    Regards,
    Santosh

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width