Fields and values checked in tables and indexes


This topic contains tables that detail the fields and values that the CHECK TABLESPACE and CHECK INDEX commands check. For more information about these commands, see CHECK-TABLESPACE-options and  CHECK INDEX options.

Each table corresponds to the type of check being performed and the type of page being checked. Each table lists the fields checked, shows the minimum level at which the check is performed, indicates the type of check performed, and describes the value against which the check is made.


Important

 Note the information for each table:

  • The Level column indicates the level at which checking begins.
  • The Type of check column contains one of the following values:
    • c/w (consistent with)
    • = (equal to)
    • n/a (neither)

For more information about the fields listed in these tables, see the IBM Db2 Diagnosis Guide and Reference.

CHECK TABLESPACE: page types

The following table lists all page-type fields and values that the CHECK TABLESPACE option checks:

Field checked

Level

Type of check

Associated field or value

Comments

PGCOMB bit 1

1

n/a

NA

Report if the bit is on (page read with I/O error)

PGCOMB bit 2

1

n/a

NA

Report if the bit is on (page modified by REPAIR utility)

PGCOMB bit 4

1

c/w

Page trailer byte

NA

PGLOGRBA

1

c/w

Current Db2 log RBA

Checked only if PGLOGID is 0000 0001

PGNUMBER

1

c/w

Actual page number

NA

PGFLAGS bit 1

1

n/a

NA

Report if the bit is on (broken page bit)

PGFLAGS bits 2 through 8

1

c/w

Page type

NA

PGFLAGS bit 7

1

c/w

Space map modified page indicator

Only on data pages

CHECK TABLESPACE: header page

 The following table lists all the header page fields and values that CHECK TABLESPACE checks:

Field checked

Level

Type of check

Associated field or value

HPGDBID

1

c/w

Db2 catalog

HPGFLAGS bit 5
HPGUSERD bit 14
HPGPBRUTS bit 15
HPGPBGUTS

1

c/w

Db2 catalog

HPGFLAGS2 bit 1
HPGMC

1

c/w

Db2 catalog

HPGMAXL

1

c/w

Db2 catalog

HPGNUMCO

1

c/w

Db2 catalog

HPGOBID

1

c/w

Db2 catalog

HPGPARTN

1

c/w

Db2 catalog

HPGPGSZ

1

c/w

Db2 catalog

HPGPSID

1

c/w

Db2 catalog

HPGROID

1

c/w

Db2 catalog

HPGRRFMT

1

c/w

Db2 catalog

HPGSGNAM

1

c/w

Db2 catalog

HPGSGSZ

1

c/w

Db2 catalog

HPGSSNM

1

c/w

Db2 catalog

HPGTBLC

1

c/w

Db2 catalog

HPGTSFLOG

1

c/w

Db2 catalog

HPGVCATN

1

c/w

Db2 catalog

CHECK TABLESPACE: space map page

The following table lists all the space map page fields and values that CHECK TABLESPACE checks:

Field checked

Level

Type of check

Associated field or value

Comments

SEGNUM

1

c/w

Page size and segment size in the Db2 catalog

Segmented table space only

SEGSIZE

1

=

Segment size in the Db2 catalog

Segmented table space only

SEGFREE

1

=

Actual number of free segments

Segmented table space only

SEGENT

1

=

Actual lowest free segment entry

Segmented table space only

SEGLENT

1

=

Actual last formatted page

Segmented table space only

SEGNEXT

2

=

Actual absolute next segment in the chain

Segmented table space only

SEGOBID

2

c/w

Table OBIDs from the Db2 catalog for this table space

Segmented table space only

SEGFLAG

2

c/w

Segment chains

Segmented table space only

SEGFLAG bit 1
SEGALLOC

2

=

1... ....

Must be on a segment chain

SEGFLAG bit 2
SEGFIRST

2

=

1... ....

Must not be pointed to by any other segment

SEGFULL

1

c/w

Actual data page free space

Segmented table space only

FOSMNENT

1

c/w

Page size from Db2 catalog

Simple or partitioned table space only

FOSMLENT

1

c/w

Last formatted page within space map scope

Simple or partitioned table space only

CHECK TABLESPACE: data page

The following table lists all the data page fields and values that CHECK TABLESPACE checks:

Field checked

Level

Type of check

Associated field or value

Comments

PGFREE

1

=

Sum of all hole lengths plus the length of contiguous free space on this page

NA

PGFREEP

1

c/w

Length of contiguous free space and size of ID map

NA

PGHOLE1

1

=

Offset of the first large hole or X’0000’ if no large hole

NA

PGMAXID

1

=

Actual number of ID map entries

Must be greater than zero

PGSFLAGS

1

c/w

Record type

NA

PGSLTH

1

c/w

Range of record lengths for rows in this table

NA

PGSOBD

1

c/w

OBIDs of the tables in this table space in the Db2 catalog

NA

PGSID

1

c/w

ID map entry pointing to this record

NA

PGSOWRID

2

c/w

Actual overflow record

Pointer record only

PGHLTH

1

=

Actual hole length

Large hole

PGHCHAIN

1

=

Offset of next large hole, or X’0000’ if last on the chain

Large hole

PGHFLAGS

1

c/w

Size of hole

NA

CHECK INDEX: all index page types

The following table lists all the page type fields and values that CHECK INDEX checks.

Field checked

Level

Type of check

Associated field or value

Comments

PGCOMB bit 1

1

n/a

NA

Report if the bit is on (page read with I/O error)

PGCOMB bit 2

1

n/a

NA

Report if the bit is on (page modified by REPAIR utility)

PGCOMB bit 4

1

c/w

Page trailer byte

NA

PGLOGRBA

1

c/w

Current Db2 log RBA

Checked only if PGLOGID is 0000 0001

PGNUMBER

1

c/w

Actual page number

NA

PGFLAGS bit 1

1

n/a

NA

Report if the bit is on (broken page bit)

PGFLAGS bits 2 through 8

1

c/w

Page type

NA

CHECK INDEX: index header page

The following table lists the Header page fields and values that CHECK INDEX checks:

Field checked

Level

Type of heck

Associated field or value

HPGDBID

1

c/w

Db2 catalog

HPGPSID

1

c/w

Db2 catalog

HPGSSNM

1

c/w

Db2 catalog

HPGFOID

1

c/w

Db2 catalog

HPGPARTN

1

c/w

Db2 catalog

HPGNSUBP

1

=

Actual number of subpages for this index

HPGROID

1

c/w

Db2 catalog

HPGMAXL

1

c/w

Db2 catalog

HPGNUMCO

1

=

Actual number of index key columns for this index

HPGFLAGS bit 5
HPGUSERD

1

c/w

Db2 catalog

HPGFLAGS bit 6
HPGUIDX

1

c/w

Db2 catalog

HPGIFLGS bits 1, 2, and 3

1

c/w

Db2 catalog and HPGPARTN of the header page

HPGIFLGS bit 4

1

c/w

Db2 catalog and HPGPARTN of the header page

HPGITYPE

1

c/w

Db2 catalog

HPGSGNAM

1

c/w

Db2 catalog

HPGVCATN

1

c/w

Db2 catalog

CHECK INDEX: space map page

The following table lists space map page fields and values that CHECK INDEX checks:

Field checked

Level

Type of check

Associated field or value

PPSMNE

1

=

X'7FC4'

IPSLUSED

1

c/w

IPPSMNE

CHECK INDEX: physical index data page header

The following table lists physical index data page header fields and values that CHECK INDEX checks:

Field checked

Level

Type of check

Associated field or value

Comments

IPFLAGS bits 4 and 5

1

c/w

DB2 catalog

NA

IPNKEYS

1

c/w

Number of keys

NA

IPFREESP

1

c/w

Amount of free space

NA

IPFCHSIZ

1

c/w

first free space entry

NA

IPKEYLN

1

c/w

DB2 catalog

NA

CHECK INDEX: leaf page

The following table lists leaf page fields and values that CHECK INDEX checks:

Field checked

Level

Type of check

Associated field or value

Comments

IPNDRIDS

1

c/w

Number of non-deleted RIDs

NA

IPDRIDS

1

c/w

Number of deleted RIDs

NA

IPNRIDS

1

c/w

Number of RIDs

NA

IPFCESIZ

1

c/w

Size of free space entry

NA

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*