DBAsupport.com Forums - Powered by vBulletin
Results 1 to 7 of 7

Thread: Error while running a CRON

  1. #1
    Join Date
    Feb 2001
    Posts
    23
    Hi,

    I am trying to run a script as cron job,

    which has the following line to invoke sqlplus

    /u01/home/oracle/product/8.1.7/bin/sqlplus -S usr/passwd


    The cron gives an error

    Message file sp1.msb not found
    Error 6 initializing SQL*Plus

    Any help/suggestions appreciated

    Thanks, VG

  2. #2
    Join Date
    Dec 2001
    Location
    USA
    Posts
    620
    Pl. check that your ORACLE_HOME is correctly set and all other environment var. are also properly set.

    Thanks
    Sam
    ------------------------
    To handle yourself, use your head. To handle others, use your heart

  3. #3
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    Your environment is not setup correctly. You can use oraenv inside the script being called or in your crontab file.
    Jeff Hunter

  4. #4
    Join Date
    Feb 2001
    Posts
    23
    Can u please explain how to use the oraenv inside the cron ?

  5. #5
    Join Date
    May 2000
    Posts
    50
    This is how I have it in my scripts.

    ORAENV_ASK=NO;export ORAENV_ASK
    . oraenv

  6. #6
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    just add

    . $HOME/.profile 2>&1 >/dev/null

    after #!/bin/ksh

  7. #7
    Join Date
    Feb 2001
    Posts
    23
    Thanks, it worked

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