An NDB may become corrupted by an NDB full or region cancelled event. To recover the data, you must use the NDB ALTER OPT=BLDX command to rebuild the indexes.
Note: This procedure e following steps are from the IPLOG file and apply to all NDBs.
To fix a corrupted NDB
The following shows some sample JCL:
//DEFWRK EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=* //SYSIN DD * DELETE (hlq.TEST.NDBWORK) CL DEFINE CLUSTER (NAME(hlq.TEST.NDBWORK) - MGMTCLAS(DEFAULT) - STORCLAS(NMDPOOL) - INDEXED - RECORDS(1000000 100000) - SPEED - SHAREOPTIONS(2 3) - ) - DATA (NAME(hlq.TEST.NDBWORK.D) - CONTROLINTERVALSIZE(4096) - RECORDSIZE(1017 4089) - FREESPACE(0 0) - KEYS(4 0) - ) - INDEX (NAME(hlq.TEST.NDBWORK.I) - CONTROLINTERVALSIZE(1024)) /*
ALLOCATE DD=NDBWORK DSN=hlq.TEST.NDBWORK DISP=SHR
Issue the following command to open the work file as a VSAM file.
UDBCTL OPEN=NDBWORK STRNO=3 BUFNI=5 BUFND=6
NDB PURGE IPLOG
NBD STOP IPLOG IMM
NDB ALTER IPLOG OPT=CHKX DB WORK=NDBWORK DETAIL=YES SORT=100000
Minimizing I/O on the work file by specifying the maximum value for sort memory reduces execution time.
UDBCTL CLOSE=NDBWORK UNALLOC DD=NDBWORK
NDB ALTER IPLOG OPT=BLDX DB WORK=NDBWORK DETAIL=YES SORT=100000
Minimizing I/O on the work file by specifying the maximum value for sort memory reduces execution time.
If the NDB ALTER BLDX action fails, and needs to be rerun, the work file must be unallocated and redefined.
| Copyright © 2011 CA. All rights reserved. | Tell Technical Publications how we can improve this information |