Generate Recover and Bind Statements for Freed Packages
If a package is accidentally freed, use the DDL Activity Report to generate recover and bind statements for the freed package.
Information about packages is stored in several Db2 catalogs and directories. A package becomes invalid when any objects that the packages depend on are altered or dropped. When a package becomes invalid, Db2 retains the information about the package. To reduce the size of the Db2 directory and catalog, you can use DSN sub-command FREE PACKAGE to delete invalid or unused packages.
If you accidentally freed a package that is needed by application programs, you can use the DDL Activity Report to generate a BIND PACKAGE statement that has all the BIND/REBIND statements necessary to bind the freed package to the same state and the statements to rebind the plans which contained the freed packages.
- Follow these steps:
- SelectProcess Logfrom the CA Log Analyzer for DB2 for z/OS Main Menu.TheProcess Log - Report Specificationpanel (LAPRM) opens.
- SelectDDL Activityand pressEnter.TheDDL Activity Report Optionspanel (LAPRDDL) opens.
- Complete the following fields:
- SpecifyU(to create UNDO DDL) in theOutput Formatfield.
- SpecifyD(Detail) in theLevel of Detailfield.
- (Optional) SpecifyI(Include) in thePrimary Authidsfield underLog Data FilterOptionsand enter the authorization ID of the person or process that freed the package.
- SpecifyX(Exclude) in theGrant/Revokefield to exclude records that are related to Grants and Revokes.
- SpecifyO(Only) in theBind /Rebindfield to exclude all except Bind and Rebind records.
- (Optional) Use otherMiscellaneous Optionsto include or exclude other types of data from the DDL report.
- PressPF3until theReport Source Specificationpanel (LAPRLRNG) appears.
- Specify the approximate time range of when the package was freed in theLog Processing Rangesection.
- PressPF3(End).TheOutput Specificationpanel (LAPOS14) appears.
- Specify a data set name for the BIND statements in theDataset Name
- PressPF3until theReport Submission Screenpanel (LAPREPEX) opens.
- SpecifyBorOinExecution Modeand pressEnter.CA Log Analyzer for DB2 for z/OS generates the BIND/REBIND statements based on the specified execution mode and saves to the specified destination.