View previous topic :: View next topic
|
Author |
Message |
sudhee_rb
New User
Joined: 29 Mar 2006 Posts: 34
|
|
|
|
Hi All,
Can anybody please let me know
How to trace if a DB2 stored procedure is in a loop?
One of my batch jobs is calling one DB2 stored procedures and it is running for a long time.
Thanks in advance. |
|
Back to top |
|
|
muthuvel
Active User
Joined: 29 Nov 2005 Posts: 217 Location: Canada
|
|
|
|
How did you know that stored procedure is causing the loop?
Check,whether if the stored procedure is also being used by some other program? |
|
Back to top |
|
|
Bharath Bhat
Active User
Joined: 20 Mar 2008 Posts: 283 Location: chennai
|
|
|
|
Give a display statement in the main para. Check it in spool.
For displaying in spool, you should have
Code: |
PROCESS OUTDD(progname) |
in the begining of the code.
Check the WLM job that runs the stored proc. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
One of my batch jobs is calling one DB2 stored procedures and it is running for a long time. |
This is most often caused by poor table design, poor sql design, or trying to process an unreasonable amount of data in a single query. Some very innocent-looking code can drain even a very large system.
What does this stored procedure do? |
|
Back to top |
|
|
|