If you rebind all the plans/packages with Explain = Yes, you can query the plan_table to find out which programs access which tables. This will work with statically bound plans/packages (embedded SQL) and not ad-hoc queries or dynamically prepared SQL statements. But you can manually explain ad-hoc queries with the SQL statement EXPLAIN if you know what the SQL statements are.
Also, the plan_table will only tell you the tables and not the columns, although you can create a statement table as part of the explain process. See the "Administration Guide" or "Application Programming and SQL Guide".
You could also query the DB2 catalog to associate plans, tables, and statements.
Last edited by Marcus_A; 05-04-04 at 19:09.
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390