The CHECK LOB Option

 <  Day Day Up  >  

The CHECK LOB Option

The CHECK LOB utility is used to verify the accuracy and integrity of data in auxiliary table spaces for LOB columns . It can be used to detect structural defects in the LOB table space and invalid LOB values.

After successfully running CHECK LOB , all CHECK PENDING (CHKP) and auxiliary warning ( AUXW ) statuses will be reset. If exceptions are encountered , CHECK LOB will report on those exceptions only. CHECK LOB cannot be used to fix the exceptions it finds.

The JCL in Listing 31.3 can be used to check data in a DB2 sample auxiliary table that contains LOB columns.

Listing 31.3. CHECK LOB JCL
 //DB2JOBU  JOB (UTILITY),'DB2 CHECK LOB',MSGCLASS=X,CLASS=X, //   NOTIFY=USER //* //**************************************************************** //* //*            DB2 CHECK LOB UTILITY //* //**************************************************************** //* //UTIL EXEC DSNUPROC,SYSTEM=DSN,UID='CHECKLOB',UTPROC=" //* //*  UTILITY WORK DATASETS //* //DSNUPROC.SORTWK01 DD UNIT=SYSDA,SPACE=(CYL,(5,1)) //DSNUPROC.SORTWK02 DD UNIT=SYSDA,SPACE=(CYL,(5,1)) //DSNUPROC.SORTOUT DD DSN=&&SORTOUT, //        UNIT=SYSDA,SPACE=(CYL,(5,1)) //DSNUPROC.SYSERR DD DSN=&&SYSERR, //        UNIT=SYSDA,SPACE=(CYL,(1,1)) //DSNUPROC.SYSUT1 DD DSN=&&SYSUT1, //        UNIT=SYSDA,SPACE=(CYL,(5,1)) //DSNUPROC.UTPRINT DD SYSOUT=X //DSNUPROC.SYSIN    DD  *     CHECK LOB TABLESPACE DSN8D81L.DSN8S81M      EXCEPTIONS 0 /* // 

CHECK LOB Phases

The five phases of the CHECK LOB utility are:

UTILINIT

Sets up and initializes the CHECK LOB utility

CHECKLOB

Scans all active pages of the LOB table space

SORT

Sorts the records from the CHECKLOB phase; reports four times the number of rows sorted

REPRTLOB

Examines records that are produced by the CHECKLOB phase and sorted by the SORT phase, and issues error messages

UTILTERM

Performs the final utility cleanup


CHECK LOB Locking Considerations

Any operation or other online utility that attempts to update the same LOB table space cannot be run at the same time as CHECK LOB .

CHECK LOB will drain write claim classes for both the LOB table space and the auxiliary table index being processed .

The EXCEPTIONS Parameter

The EXCEPTIONS parameter is used to specify the maximum number of exceptions, which are reported by messages only. If the maximum number of exceptions is exceeded, CHECK LOB will terminate in the CHECKLOB phase.

Specifying EXCEPTIONS 0 indicates that no limit is to be applied to the number of exceptions.

NOTE

If the EXCEPTIONS parameter is not specified, CHECK LOB will use EXCEPTIONS 0 as the default.


 <  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