Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trace db2 sql code - Any Application? 1

Status
Not open for further replies.

julen

Programmer
Mar 26, 2006
27
ES
Hi everybody!!!

I have been writing db2 sql code for two years, and now, I wonder if anyone knows if exists any programm or application to debug/trace easily this code.

Can you help me?

Thank you very much.
 
Hi Julen,
When you say trace, do you wish to see what access paths are being taken etc.? If so, you need to look into the EXPLAIN feature. There any many products on the market, suitable for whatever platform you happen to be on, that take DB2's basic EXPLAIN feature and enhance it to be more user friendly, but basically you EXPLAIN your SQL which writes rows to a table called PLAN_TABLE. This can then be looked at to see what order the tables are being accessed and whether indexes are being used or table scans done.

Hope this helps.

Marc
 
Hi MarcLodge!!

I don´t know if I am clear. What I want to know is if it is possible with an application, point the exact line of error in my code.



My sql db2 is for an as/400.

Any ideas of different applications??

Thanks again
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top