Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2013
    Posts
    8

    Unanswered: db2adutl is not working in crontab.

    Hi Team,
    I have run db2adutl query db TOOLSDB,its showing list of backups but when put same query in db2inst1 crontab failed to show backup images,please unblock me.
    The outputs of above two scenarios are enclosed in attachment.

    TSM PARAMETERS OF TOOLSDB:
    First log archive method (LOGARCHMETH1) = TSM
    TSM management class (TSM_MGMTCLASS) =
    TSM node name (TSM_NODENAME) =
    TSM owner (TSM_OWNER) =
    TSM password (TSM_PASSWORD) =

    dsm.sys

    servername DB2
    commmethod tcpip
    tcpport 10110
    tcpserveraddress 10.66.111.110
    passwordaccess generate
    enablelanfree no
    nodename v-qa-inf-db-01_db2
    txnbytelimit 2097152
    tcpnodelay yes
    errorlogname /database/DevDB/db2inst1/NODE0000/dsmerror.db2
    errorlogretention 30
    schedmode prompted
    tcpclientport 10116
    schedlogname /database/DevDB/db2inst1/NODE0000/dsmsched.db2
    schedlogretention 30
    Attached Thumbnails Attached Thumbnails db2adutlmanual.PNG   crontabopt.PNG  

  2. #2
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    have you added the env variables DSMI... when running in crontab ?
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  3. #3
    Join Date
    Oct 2013
    Posts
    8

    db2adutl not working in crontab

    yes, I have already added DSMI variables in /home/db2inst1/sqllib/userprofile when running running in crontab

    export DSMI_CONFIG=/database/DevDB/db2inst1/NODE0000/DB2.opt
    export DSMI_LOG=/database/DevDB/db2inst1/NODE0000/dsmerror.db2
    export DSMI_DIR=/opt/tivoli/tsm/client/api/bin64

  4. #4
    Join Date
    Apr 2012
    Posts
    1,034
    Provided Answers: 18
    Works fine for me...but I usually wrap the db2adutl in a shell script that ensures the relevant environment variables are correctly set before running db2adutl.

    It's not enough to put these vars only in the userprofile (which runs if the db2profile runs), but crontab wont run in the db2profile for you , hence a wrapper gives a more predictable result.

  5. #5
    Join Date
    Oct 2013
    Posts
    8

    db2adutl not working in crontab

    Thanks team,

    Now its working for me after running ./db2profile.



    Quote Originally Posted by db2mor View Post
    Works fine for me...but I usually wrap the db2adutl in a shell script that ensures the relevant environment variables are correctly set before running db2adutl.

    It's not enough to put these vars only in the userprofile (which runs if the db2profile runs), but crontab wont run in the db2profile for you , hence a wrapper gives a more predictable result.

Posting Permissions

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