Results 1 to 7 of 7
  1. #1
    Join Date
    Apr 2009
    Posts
    11

    Unanswered: Need script to send email if application is in waiting more than 10 hours

    Hi,

    As per our current requirement we need to implement a script which will send eamil alert about the applications which are in UOW waiting state for around 10 hours.

    Currenlty ia m trying to use

    db2 list applications show detail command and from the output we have to compare the status change time stamp to the current timestamp.

    But i am unable to compare it.

    Does anybody has better idea about it ?

    Thanks

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    What DB2 version and OS are you using?

    Andy

  3. #3
    Join Date
    Apr 2009
    Posts
    11
    We are at db2 9.1 FP4 .

  4. #4
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    You could use the administrative views to calculate the result set:

    select * from sysibmadm.applications where appl_status = 'UOWWAIT' and snapshot_timestamp - status_change_time >= 100000


    Andy

  5. #5
    Join Date
    Apr 2009
    Posts
    11
    Thanks for quick reply...

  6. #6
    Join Date
    Apr 2009
    Posts
    11
    Just one more query :

    Is 100000 is difference in seconds ?
    If yes then for 10 hour it should be 10X60X60=36000 .

    Please correct me if i am wrong.

    Thanks

  7. #7
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Subtracting Date and time values result in a "time duration". Look it up in the manual.

    Andy

Posting Permissions

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