If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Program / column association

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-04-04, 17:36
wairds wairds is offline
Registered User
 
Join Date: May 2004
Posts: 1
Program / column association

DB2, OS/390

Is there a utility I can run which will list tables & columns accessed by program name?

Thanks in anticipation.
Reply With Quote
  #2 (permalink)  
Old 05-04-04, 18:02
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,198
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.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390

Last edited by Marcus_A; 05-04-04 at 18:09.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On