Page 1 of 1

DB2 Z/os - Last used time

PostPosted: Thu Aug 25, 2011 2:20 pm
by p19689
Hi , I would like to identify all the Views that haven't been used for last 24 months . The application was coded in COBOL and runs on DB2 Z/os V9. What is the best way to approach this task.

Re: DB2 Z/os - Last used time

PostPosted: Tue Aug 30, 2011 12:44 pm
by GuyC
select distinct BQUALIFIER,BNAME,DNAME from sysibm.syspackdep where btype = 'V'

gives you all packages where the views are used.
Unfortunately the column lastused in syspackage is not yet maintained in db2 v9.
Unless you have SMF history of monitor trace 7 there is no info in db2 when a package was last used.

Re: DB2 Z/os - Last used time

PostPosted: Tue Aug 30, 2011 9:15 pm
by p19689
Thanks GuyC, What you are suggesting is to go through the recently used packages and identify the views from them as there is no direct way to do that ?

Re: DB2 Z/os - Last used time

PostPosted: Wed Aug 31, 2011 12:39 pm
by GuyC
yes