Checking the DBD header and chain of files
After you locate the DBD in the dump, the DBD header and chain of files can be analyzed for inconsistencies.
Procedure
To check the DBD header and chain of files:
- Check the DBD header.
The control block identifier (first 2 bytes of the DBD header) is X'2039'. At offset X'04' is the
DBDeye-catcher. - Cross-check the DBD with the Db2 catalog.
Issue the following SQL statement, specifying the DBID for the DBD being checked.
SELECT NAME FROM SYSIBM.SYSDATABASE WHERE DBID=dbid;The result from this SELECT statement should be one row, and the name should equal the name found in the field named OBDDBNAM. If the number of rows that are returned is not 1 or the name does not equal the name found in OBDDBNAM, make a note of the error.
- Check the OBD file chain.
The OBDDFILE field in the OBDDBD contains the OBID of the first file OBD (OBDFILE). The OBDFINX field in the OBDFILE contains either 0 or the OBID of the next file OBD. (A zero indicates that the last file OBD in the chain.)
For each file OBD (indicated by an OBDTYPE field that equals binary B'10') on the file chain, mark it and perform the check that is described under Checking the files.
If the file chain is damaged (that is, the OBD located is not a file OBD), make a note of the error.
- After you complete this procedure, no errors are found and if all OBIDs are marked, the structure of the DBD is probably consistent. If there are one or more unmarked OBIDs, then there is one or more errors.
- If any errors are found when you analyze the structure of the DBD, contact the IBM® support center and describe the analysis that was done.