Checking the files
After you locate the DBD in the dump, the files can be analyzed for inconsistencies.
Procedure
To check each file that is located by OBD:
- Cross-check the file OBD with the catalog. To do this task,
issue the following SQL statements, replacing
dbidwith the DBID of the DBD being checked andobidwith the OBID of the file that is being checked.SELECT NAME, PSID FROM SYSIBM.SYSTABLESPACE WHERE DBID=dbid AND OBID=obid;The result is one row, and the name and PSID matches the OBDFNAME and OBDFIPS, in OBDFILE.
If the number of rows that are returned is not 1, or if the name and PSID do not match, make a note of the error.
- Check the data page set of the file OBD. Use the OBID contained
in the OBDFIPS field to locate, check, and mark the data page set
OBD (OBDPSET). The value for OBDTYPE is binary B'11'. To
check the data page set OBD:
- Determine whether the value of the OBDPSOB field matches the file OBID.
- Cross-check the page set OBD with the catalog. Issue the following SQL statement, replacing
obdfnamewith the value found in the OBDFNAME field of the file OBD, and replacingdbddbnamwith the database name of the DBD being checked (that is, the value found in the DBDDBNAM field of the DBD header).SELECT COUNT(*) FROM SYSIBM.SYSTABLEPART WHERE TSNAME=obdfname AND DBNAME=dbddbnam;The result is 1 if the table space is a simple table space (that is, if OBDPSANM equals 0). If the table space is partitioned, the result is equal to the value of OBDPSANM (in OBDPS).
- Check the OBD record chain within the file. The OBDFIREC
field in the OBDFILE contains the OBID of the first record OBD (OBDREC).
The OBDREREC field in OBDREC contains either a 0 or the OBID of the
next record OBD. A 0 in OBDREREC indicates that it is the last record
OBD.
Check the record chain for the file. Mark each record OBD (indicated by an OBDTYPE field that equals binary B'01') in the record chain. Perform the check that is described under Checking the records.
If the record chain is damaged (that is, the OBD located is not a record OBD), make a note of the error.
- Return to the procedure that referred you here.