Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2004
    Location
    India
    Posts
    41

    Unanswered: running a sql file from cron tab;

    Hi,

    I want to run a sql query from a crontab.
    I hav written a script which enters SQLPLUS , executes the query and directs the output to a flat file.

    My problem is when Iam palcing the script in crontab it is throwing an error .But when executed in the prompt ,it is running.

    pls give ur suggestions on that.

  2. #2
    Join Date
    May 2004
    Location
    Barcelona, Spain
    Posts
    54
    be sure of setting in the script any environment variable the script will need
    when you are logged in, they get set in .bashrc, .profile ...
    but cron does not read these files, so you have to include the definitions in your script

    good luck

Posting Permissions

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