Posts

Showing posts from May 17, 2015

DB2 LUW Invalid Packages - detection, Investigation, and Resolution

I was not able to find what I considered a good, clear reference for this when I recently encountered it at a customer installation.

I found that there were quite a few invalid packages that needed to be dealt with.
The worst, of course, were those with a value of 'X' in the VALID indicator. (VALID = 'X').

So, here are some simple steps I followed to investigate and resolve these issues.You, of course, may want to investigate these items further.
Get the packages that have issues: db2 "select pkgschema, pkgname, unique_id, valid from syscat.packages where VALID <> 'Y'" > invalid_packages.txt
To get the ones that require manual intervention, use db2 "select pkgschema, pkgname, unique_id, valid from syscat.packages where VALID = 'X'"
Figure out if those packages contain your SQL: db2 "select pkgschema,pkgname,unique_id, TEXT from syscat.statements where UNIQUE_ID = x'414141414157465A' AND PKGNAME = 'STADMG02'…