Results 1 to 3 of 3

Thread: crontab db2

  1. #1
    Join Date
    Nov 2003
    Posts
    68

    Unanswered: crontab db2

    hi to all


    I have seen this error in the db2 forum but not a finalized resolution

    SQL10007N Message "-1390" could not be retrieved.

    here is my problem:

    I am using Udb 7.2 on Red Hat Linux v6.2.

    I created a crontab entry for my script under the db2 user.

    crontab entry:

    37 16 * * 1-5 /kal/db2inst1/db2_backup

    where dia_backup is my script.

    Contents of the dia_backup script:


    /home/db2inst3/sqllib/bin/db2 force applications all
    /home/db2inst3/sqllib/bin/db2 backup db dia to '/data/arraya/bck'


    Whenever the job is executed from the crontab it fails with the above error.

    If I run the script from the os command line it works.

    Any suggestions?

    NOTE:
    I verified that my DB2INSTANCE paramter is set and I have also
    checked the file permissions for where the backup file is
    suppose to end up.


    pl tell me...

  2. #2
    Join Date
    Jul 2003
    Location
    Switzerland, Basle
    Posts
    10
    did you verify the DB2INSTANCE is set WITHIN the scope of the crontab-script ? (or did you only check on the commandline ?)

    i suggest to extend your script to check it out
    ----------------------------------
    echo "DB2INSTANCE is: $DB2INSTANCE" > /tmp/db2_backup.log
    home/db2inst3/sqllib/bin/db2 force applications all
    /home/db2inst3/sqllib/bin/db2 backup db dia to '/data/arraya/bck'
    ----------------------------------

  3. #3
    Join Date
    Nov 2002
    Location
    Delaware
    Posts
    186
    You need to set your environment variables, I would put the command in a script, that loads your profile then just execute the script.


    load env variables
    run commands

Posting Permissions

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