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