Results 1 to 3 of 3

Thread: DB2LOOK in EEE

  1. #1
    Join Date
    Oct 2003
    Posts
    29

    Arrow Unanswered: DB2LOOK in EEE

    Friends,

    The requirement is DB2LOOK should run in cron job every mid night in EEE.

    Script
    ====
    DATE_HOUR=`date +"%y%m%d.%H.%M.%S"`
    DB2INSTANCE=db21

    export DB2INSTANCE

    /db21/sqllib/bin/db2look -d edwtest1 -u db21 -l -o /db21/DB/db2look
    /dlt$DATE_HOUR.out 2> /tmp/test

    Crontab
    =====
    04 19 * * * /db21/DB/scripts/db2look.ksh > /dev/null 2<&1

    /tmp/test
    ======
    -- Output is sent to file: /db21/DB/db2look/dlt031107.19.04.00.out
    sh: db2_all: not found.

    Any solutions.....

    -Rac

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650

    Re: DB2LOOK in EEE

    . $INSTHOME/sqllib/db2profile

    should be the first line in your script ... (You'll not need to export DB2INSTANCE)

    Cheers
    Sathyaram

    Originally posted by udb_dba
    Friends,

    The requirement is DB2LOOK should run in cron job every mid night in EEE.

    Script
    ====
    DATE_HOUR=`date +"%y%m%d.%H.%M.%S"`
    DB2INSTANCE=db21

    export DB2INSTANCE

    /db21/sqllib/bin/db2look -d edwtest1 -u db21 -l -o /db21/DB/db2look
    /dlt$DATE_HOUR.out 2> /tmp/test

    Crontab
    =====
    04 19 * * * /db21/DB/scripts/db2look.ksh > /dev/null 2<&1

    /tmp/test
    ======
    -- Output is sent to file: /db21/DB/db2look/dlt031107.19.04.00.out
    sh: db2_all: not found.

    Any solutions.....

    -Rac
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  3. #3
    Join Date
    Oct 2003
    Posts
    29
    Thank you Satyaram

    Cheers
    -Rac

Posting Permissions

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