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?