Example 5: SHRLEVEL CHANGE: CHECK INDEX and CHECK TABLESPACE of a specified table space
This example shows a SHRLEVEL CHANGE CHECK INDEX job using SNAPSHOT UPGRADE FEATURE (SUF). This job combines index checking with table space checking while the data remains available in read/write status.
CHECK PLUS performs intrapage and interpage checks on the table space only. Because KEYSONLY is specified, the job checks only for the correct relationships between index keys and table rows and does not perform the level 1 index page structure checks. In addition, this job performs column data verifications.
Command option XBMID specifies a subsystem ID (SSID) for XBM, overriding any value specified for the XBMID installation option. In this example, no value was specified for the installation option. Message BMC50277I provides statistics about the SUF operation.
This CHECK INDEX job reports three page VERIFY condition violations (see message BMC52470W). These errors are violations of column conditions that were specified with the VERIFY option of the RULES specification. Because of these errors, the utility completes with return code 4.
Messages BMC52471I list the columns specified in the failed condition along with corresponding column values. Because an index exists, CHECK PLUS lists and flags the index columns to assist in identifying the rows in violation. In this example, columns 2 and 5 are listed in the message and flagged as index columns but are not in the condition clause.
Message 50041I indicates the status of zIIP processing. For this example, an XBM subsystem ID was specified for SHRLEVEL CHANGE processing. CHECK PLUS uses the same XBM subsystem ID for zIIP processing. The following table describes the key command options for this job.
Command options for example 5
Command options used in JCL | Description |
---|---|
TABLESPACE | Identifies the table space for which you want all indexes checked. |
SHRLEVEL CHANGE | Specifies the level of access that concurrently operating Db2 applications and utilities have to the target spaces This feature enables read/write access to the table space while CHECK PLUS checks a consistent image of the data. |
XBMID | Specifies the XBM subsystem to be activated when using XBM or SUF with CHECK PLUS |
CHECKTSLEVEL 2 | Performs all CHECKTSLEVEL 1 checks on the specified table space plus additional interpage checks on such items as overflow pointers and records, valid rows in correct partitions, and intact segment chains |
CHECKIXLEVEL 2 | Performs all CHECKIXLEVEL 1 checks plus checks on the correct relationships between index keys and table rows |
KEYSONLY | Performs checks only on the correct relationships between index keys and table rows and does not perform the page structure checks of CHECKIXLEVEL 1 |
SORTDEVT | Specifies the device type for the sort work files that BMCSORT will allocate dynamically |
RULES FOR TABLE | Allows you to define RI and column condition rules for CHECK PLUS to verify for the specified table |
VERIFY | Allows you to specify the condition that must be true for a column value to be valid |
JCL for example 5
//CHECK05 EXEC PGM=ACKUMAIN,
// PARM=(DECA,ACKEX05,NEW,,'MSGLEVEL(1)')
//STEPLIB DD DISP=SHR,DSN=product.libraries
// DD DISP=SHR,DSN=DB2.DSNEXIT
// DD DISP=SHR,DSN=DB2.DSNLOAD
//SYSIN DD *
CHECK INDEX TABLESPACE ACKNDB.ACKNS05
SHRLEVEL CHANGE XBMID XBM4
CHECKTSLEVEL 2
CHECKIXLEVEL 2 KEYSONLY
SORTDEVT SYSDA
RULES FOR TABLE ACK.ACKN05T2
VERIFY (NOT (COL3_CHAR_250 LIKE '%TTT%'))
//SYSPRINT DD DSN=ACK.EXAMP05.SYSPRINT,
// UNIT=SYSDA,SPACE=(CYL,(1,1)),DISP=(NEW,CATLG)
//UTPRINT DD SYSOUT=*
SYSPRINT for example 5
(C) COPYRIGHT 1993 - 2011 BMC SOFTWARE, INC.
CHECK PLUS TECHNOLOGY IS PROTECTED BY ONE OR MORE OF THE FOLLOWING U.S. PATENTS: 5,579,515; 6,163,783; AND 5,860,069
BMC50001I UTILITY EXECUTION STARTING 2/10/2011 10:19:35 ...
BMC50002I UTILITY ID = 'ACKEX05'. DB2 SUBSYSTEM ID = 'DEDR'. OPTION MODULE = 'ACK$OPTS'.
BMC50471I z/OS 1.10.0,PID=HBB7750,DFSMS FOR Z/OS=1.10.0,DB2=9.1.0
BMC50471I REGION=0M,It 16M=8848K,ABOVE 16M=1407576K,IEFUSI=NO,CPUS=3
BMC50471I MEMLIMIT=17592186040320M,AVAILABLE=17592186040320M,MEMLIMIT SET BY:REGION=0
BMC50471I CHECK PLUS FOR DB2--V10.01.00
BMC50471I NO MAINTENANCE TO REPORT
BMC50471I DB2 UTILITIES COMMON CODE--V10.01.00
BMC50471I NO MAINTENANCE TO REPORT
BMC50471I SOLUTION COMMON CODE--V10.01.00
BMC50471I NO MAINTENANCE TO REPORT
BMC50471I BMCSORT ENGINE--V02.03.01
BMC50471I NO MAINTENANCE TO REPORT
BMC50471I BMC STATS API--V10.01.00
BMC50471I NO MAINTENANCE TO REPORT
BMC50471I ACFORTSS=YES LOCKROW=YES SQLDELAY=3
BMC50471I DRNDELAY=3 MAXP=5 SQLRETRY=100
BMC50471I DRNRETRY=10 MSGLEVEL=1 UXSTATE=SUP
BMC50471I DRNWAIT=NONE OPNDB2ID=YES WBUFFS=20
BMC50471I DSER=NO PLAN=ACKQA WORKUNIT=SYSALLDA
BMC50471I DSPLOCKS=NONE SMAX=16 XBLKS=3
BMC50471I FILECHK=WARN SMCORE=(0K,0K) ZIIP=ENABLED
BMC50471I LOADDECP=NO SORTNUM=32
BMC50471I DB2 DSNHDECP MODULE SETTINGS:
BMC50471I VERSION = 910
BMC50471I SUBSYSTEM DEFAULT = DEDR
BMC50471I CHARACTER SET = ALPHANUM
BMC50471I DATE FORMAT = USA
BMC50471I TIME FORMAT = USA
BMC50471I LOCAL DATE LENGTH = 0
BMC50471I LOCAL TIME LENGTH = 0
BMC50471I DECIMAL POINT = PERIOD
BMC50471I DECIMAL ARITHMETIC = 15
BMC50471I DELIMITER = DEFAULT
BMC50471I SQL DELIMITER = DEFAULT
BMC50471I ENCODING SCHEME = EBCDIC
BMC50471I APPL. ENCODING SCHEME = EBCDIC
BMC50471I MIXED = NO
BMC50471I EBCDIC CCSID = (37,65534,65534)
BMC50471I ASCII CCSID = (819,65534,65534)
BMC50471I UNICODE CCSID = (367,1208,1200)
BMC50028I DB2 MODE = NFM
BMC50471I BMC_BMCUTIL ='BMCUTIL.CMN_BMCUTIL'
BMC50471I BMC_BMCSYNC ='BMCUTIL.CMN_BMCSYNC'
BMC50471I BMC_BMCHIST ='BMCUTIL.CMN_BMCHIST'
BMC50471I BMC_BMCRELS ='BMCUTIL.CMN_RELS'
BMC50471I BMC_BMCFKEY ='BMCUTIL.CMN_FKEY'
BMC50471I BMC_BMCPKEY ='BMCUTIL.CMN_PKEY'
BMC50471I BMC_BMCKEYS ='BMCUTIL.CMN_KEYS'
BMC50102I CHECK INDEX TABLESPACE ACKNDB.ACKNS05
BMC50102I SHRLEVEL CHANGE XBMID XBMA
BMC50102I CHECKTSLEVEL 2
BMC50102I CHECKIXLEVEL 2 KEYSONLY
BMC50102I SORTDEVT SYSDA
BMC50102I RULES FOR TABLE ACK.ACKN05T2
BMC50102I VERIFY (NOT (COL3_CHAR_250 LIKE '%TTT%'))
BMC50041I 0: ZIIP ENABLED (0) USING XBM SUBSYSTEM XBMA
BMC50004I UTILINIT PHASE COMPLETE. ELAPSED TIME = 00:00:00
BMC50394I UNABLE TO LOCATE SORT WORK DATASETS, DDNAME = 'SORTWKNN'
BMC50474I It 16M = 7781K, ABOVE 16M = 1401956K, CPUS = 3
BMC52230I MAX TASKS = 1, MAX PARTS/TASK = 1, SORTWKS/TASK = 32, MAX OPEN PARTS/TASK = 1, MAX INDEXES/TASK = 1
BMC50894I PAGE EXTERNALIZATION PROCESS STARTING AT 2/10/2011 10:19:36
BMC50650I ESTABLISHING A POINT OF CONSISTENCY FOR:
BMC50651I SPACE ACKNDB.ACKNS05 PART(0)
BMC50651I SPACE ACKNDB.ACKN0511 PART(0)
BMC50651I SPACE ACKNDB.ACKN0521 PART(0)
BMC50651I SPACE ACKNDB.ACKN0522 PART(0)
BMC50651I SPACE ACKNDB.ACKN0523 PART(0)
BMC50895I PAGE EXTERNALIZATION PROCESS COMPLETE. ELAPSED TIME = 00:00:00
BMC52286I 2: CHECKING OF DATASET 'DEDRCAT.DSNDBD.ACKNDB.ACKN0511.I0001.A001' READ 23 PAGES
BMC52470W VERIFY CONDITION VIOLATED. TABLE = 'ACK.ACKN05T2'
BMC52471I !COL2_DECIMAL_6_2=.36,COL3_CHAR_250='03111XTTT80078901284272 0000036',!COL5_VCHAR_100=
BMC52471I '**** ACKN05T2 COL5_VCHAR_100 ***'
BMC52470W VERIFY CONDITION VIOLATED. TABLE = 'ACK.ACKN05T2'
BMC52471I !COL2_DECIMAL_6_2=3.69,COL3_CHAR_250='02111XTTT80078901284888 0000369',!COL5_VCHAR_100=
BMC52471I '**** ACKN05T2 COL5_VCHAR_100 ***'
BMC52286I 2: CHECKING OF DATASET 'DEDRCAT.DSNDBD.ACKNDB.ACKN0521.I0001.A001' READ 17 PAGES
BMC52470W VERIFY CONDITION VIOLATED. TABLE = 'ACK.ACKN05T2'
BMC52471I !COL2_DECIMAL_6_2=5.69,COL3_CHAR_250='03333ATU7TTTU7887287277 0000569',!COL5_VCHAR_100=
BMC52471I '**** ACKN05T2 COL5_VCHAR_100 ***'
BMC52286I 1: CHECKING OF DATASET 'DEDRCAT.DSNDBD.ACKNDB.ACKNS05.I0001.A001' READ 50 PAGES
BMC52286I 2: CHECKING OF DATASET 'DEDRCAT.DSNDBD.ACKNDB.ACKN0522.I0001.A001' READ 5 PAGES
BMC52286I 2: CHECKING OF DATASET 'DEDRCAT.DSNDBD.ACKNDB.ACKN0523.I0001.A001' READ 7 PAGES
BMC50481I 2: UNLOAD INDEX TASK COMPLETE. ELAPSED TIME = 00:00:00
BMC50481I 1: SORT COMPLETE. ELAPSED TIME = 00:00:00
BMC50481I 1: CHECK TASK COMPLETE. ELAPSED TIME = 00:00:00
BMC50277I XBM STATISTICS: DSN='DEDRCAT.DSNDBD.ACKNDB.ACKNS05.I0001.A001 ', READS 0, HITS 0, WRITES 0, CACHE 0
BMC50277I XBM STATISTICS: DSN='DEDRCAT.DSNDBD.ACKNDB.ACKN0511.I0001.A001 ', READS 0, HITS 0, WRITES 0, CACHE 0
BMC50277I XBM STATISTICS: DSN='DEDRCAT.DSNDBD.ACKNDB.ACKN0521.I0001.A001 ', READS 0, HITS 0, WRITES 0, CACHE 0
BMC50277I XBM STATISTICS: DSN='DEDRCAT.DSNDBD.ACKNDB.ACKN0522.I0001.A001 ', READS 0, HITS 0, WRITES 0, CACHE 0
BMC50277I XBM STATISTICS: DSN='DEDRCAT.DSNDBD.ACKNDB.ACKN0523.I0001.A001 ', READS 0, HITS 0, WRITES 0, CACHE 0
BMC52277I XBLKS = 3, XFERS = 1, EMPTY WAITS = 0, FULL WAITS =2
BMC52606I VER ACK.ACKN05T2."VERIFY CONDITION" , 299 ROWS CHECKED, 3 VIOLATIONS FOUND
BMC52278I 271 ENTRIES CHECKED FOR (PGSIZE 4K) INDEX 'ACK.ACKN0511,' 0 ERRORS
BMC52278I 299 ENTRIES CHECKED FOR (PGSIZE 4K) INDEX 'ACK.ACKN0521,' 0 ERRORS
BMC52278I 299 ENTRIES CHECKED FOR (PGSIZE 4K) INDEX 'ACK.ACKN0522,' 0 ERRORS
BMC52278I 299 ENTRIES CHECKED FOR (PGSIZE 4K) INDEX 'ACK.ACKN0523,' 0 ERRORS
BMC52288I CHECK ERROR SUMMARY: PAGE EXCEPTIONS-0, CONSTRAINT VIOLATIONS-3
BMC50004I CHECK PHASE COMPLETE. ELAPSED TIME = 00:00:01
BMC50041I 0: ZIIP NOT ENABLED (0) USING XBM SUBSYSTEM XBMA
BMC50006I UTILITY EXECUTION COMPLETE, RETURN CODE = 4
Related topics