The REPORT Utility

 <  Day Day Up  >  

The REPORT Utility

Two types of reports can be generated with the REPORT utility. The first is a table space set report showing the names of all table spaces and tables tied together by referential integrity. This type of report is described in the next section. The second type deals with recovery and is discussed in Chapter 32, "Backup and Recovery Utilities."

The REPORT TABLESPACESET Option

The REPORT TABLESPACESET utility generates a report detailing all tables and table spaces in a referential table space set. As you can see in the sample JCL in Listing 31.8, the input to the utility is a single table space. The output is a report of all related table spaces and tables.

Listing 31.8. REPORT TABLESPACESET JCL
 //DB2JOBU  JOB  (UTILITY),'DB2 REPORT TS',MSGCLASS=X, //   NOTIFY=DB2JOBU,USER=DB2JOBU //* //**************************************************************** //* //*            DB2 REPORT TABLESPACESET UTILITY //* //**************************************************************** //* //UTIL EXEC DSNUPROC,SYSTEM=DSN,UID='REPORTTS',UTPROC=" //* //*  UTILITY INPUT CONTROL STATEMENTS //*       The REPORT statement generates a report of all objects //*       referentially tied to the named table space //* //DSNUPROC.SYSIN    DD  *     REPORT TABLESPACESET TABLESPACE DSN8D81A.DSN8S81D /* // 

REPORT TABLESPACESET Guidelines
Use REPORT TABLESPACESET Reports for Documentation

The REPORT TABLESPACESET utility is particularly useful for monitoring DB2 objects that are referentially related. DB2 Catalog reports such as those described in Chapter 26, "DB2 Object Monitoring Using the DB2 Catalog and RTS," are also useful but are difficult to structure so that a complete table space set is returned given a table space anywhere in the set.

Rerun the REPORT Utility After Resolving Abends

Run the REPORT TABLESPACESET utility for every table space added to the production DB2 subsystem. Additionally, if referential constraints are added to current application tables, run the REPORT TABLESPACESET utility on their corresponding table spaces immediately after their implementation. Store these reports as documentation for reference.

Periodically run the REPORT TABLESPACESET utility for table spaces that DB2 Catalog queries identify as containing tables defined with referential constraints. Ensure that the QUIESCE utility, when executed against these table spaces, is coded to quiesce all table spaces identified by the report ”as well as any other table space that is logically related to any table space in the table space set (such as programmatic referential integrity).

NOTE

graphics/v8_icon.gif

Informational referential constraints will be reported by the REPORT TABLESPACESET utility. Note also that when QUIESCE is used with the TABLESPACESET parameter, it will cause tables connected by both real and informational referential constraints to be quiesced.


If the REPORT utility abends, terminate the utility, if necessary, and rerun it.

 <  Day Day Up  >  


DB2 Developers Guide
DB2 Developers Guide (5th Edition)
ISBN: 0672326132
EAN: 2147483647
Year: 2004
Pages: 388

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net