Results 1 to 7 of 7
  1. #1
    Join Date
    Feb 2004
    Posts
    24

    Question Unanswered: How to kill or force a running task

    I have a SQL MERGE statements that are scheduled from the DB2 task center. I have found that usually the merge statement takes about 0-5 minutes to complete. But every once in a while the task will take one or more hours. Sometimes the task seems to hang indefinatelly. I would like to note here that the task essentially runs over the same amount of data each day (about 300,000 rows) The frustrating thing is that I cannot figure out what is causing this behavior. What is worse, I cannot figure out how to kill or end the task once it is running. Can someone answer the following questions:

    1. How do you end (force) a long running task that was invoked from the task center?
    2. Other than the "Show Results" item in the task's context menu how can I diagnose a task the failes or runs abnormally long?
    3. If a task normally takes less than five minutes but all of the sudden begin to take hours to complete? Could this be a locking issue? If so how do I find out?

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    1) same way to force any application. use the FORCE APPLICATION command.
    2) use the monitors (snapshot and event) to diagnose the problem. Also generate access plans for the SQL to see if maybe an incorrect access path is being generated. A good and free snapshot monitor is located at:

    http://chuzhoi_files.tripod.com/index.html

    3) Yes it could be a locking issue. See number 2 to figure it out.

    Andy

  3. #3
    Join Date
    Feb 2004
    Posts
    24
    Thanks for the tips. I will try out the monitor. In the mean time how to I find out what the agent id of the running task is?

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

    Andy

  5. #5
    Join Date
    Feb 2004
    Posts
    24
    os: windows 2003
    db2 version 9.1

  6. #6
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Use the free snapshot monitor I mentioned earlier. You can even force the application from it.

    Andy

  7. #7
    Join Date
    Feb 2004
    Posts
    24
    ok. Thanks. That tool helped alot.

Posting Permissions

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