CHECKTSLEVEL


The CHECKTSLEVEL option identifies any damaged pages found during the copy process and ensures that all target pages have correct internal formats and can be used for table space recovery.

Important

The CHECKTSLEVEL option is not applicable to INDEXSPACE specifications or to Instant Snapshots.

Related topic

CHECKTSLEVEL syntax diagram

GUID-51EC78BD-C335-404E-AB3B-1D30E43BE5C4-low.png

CHECKTSLEVEL allows you to select the level and frequency of checking for a target table space. Page checking in this way provides better use of computer resources because the integrity checks are performed when copies are made, instead of during a separate pass using a stand-alone utility. This option does not check data content. For information about performance considerations, see Page-integrity-checking-CHECKLVL.

If a issue occurs,

Some content is unavailable due to permissions.

issues a warning message (BMC474 xx) specifying the nature of the issue and, if applicable, the page number. The job completes with a condition code based on CHECKERROR or, if CHECKERROR is not specified, based on CHECKERR.

For more information about BMC474 xx messages, see BMC-Common-Db2-repository.

If you do not specify CHECKTSLEVEL, the level of checking performed by

Some content is unavailable due to permissions.

is determined by the current value of the CHECKLVL installation option, as follows:

  • If CHECKLVL=2, the level of checking performed is the same as for CHECKTSLEVEL 2.
  • If CHECKLVL=1, the level of checking performed is the same as for CHECKTSLEVEL 1.
  • If CHECKLVL=0, the level of checking performed is the same as for CHECKTSLEVEL 0. CHECKLVL=0 is the installation option default. 

CHECKTSLEVEL 0

When you specify CHECKTSLEVEL 0,

Some content is unavailable due to permissions.

provides standard minimal checking. Specifically,

Some content is unavailable due to permissions.

checks the page number, broken page indicator, consistency of the header and trailer bytes, and validity of the page’s log RBA (or LRSN with Db2 in a data sharing environment).

CHECKTSLEVEL 1

When you specify CHECKTSLEVEL 1,

Some content is unavailable due to permissions.

provides intrapage integrity checks for all pages (header pages, space map pages, and data pages). These are performed for both application table spaces and catalog and directory table spaces.

Important

When you make image copies of any of the following Db2 catalog and directory table spaces,

Some content is unavailable due to permissions.

ignores a CHECKTSLEVEL 1 specification and issue a warning message.

  • DSNDB06.SYSCOPY
  • DSNDB01.SYSUTILX
  • DSNDB01.DBD01
  • DSNDB01.SYSDBDXA

See Copying-the-Db2-catalog-and-directory.

When you specify CHECKTSLEVEL 1,

Some content is unavailable due to permissions.

performs the following intrapage checks for the indicated page type as appropriate for the version of Db2 installed.

All page types

Some content is unavailable due to permissions.

checks the following fields for all types of page:

  • PGCOMB for consistency with the page trailer byte
  • PGNUMBER for the page number and partition value
  • PGFLAGS for the setting of the 'broken' bit
  • PGFLAGS for the correct setting for the type of page

Header pages

For header pages,

Some content is unavailable due to permissions.

checks the following items for agreement with values in the Db2 catalog:

  • HPGPARTN (the number of partitions registered)
  • HPGPGSZ (the page size registered)
  • HPGVCATN (the VCAT name registered)
  • HPGDBID and HPGPSID

Also, for header pages,

Some content is unavailable due to permissions.

verifies the following items:

  • HPGZPNUM and HPGZNUMP values are both zero or nonzero.
  • HPGSSNM matches the Db2 subsystem name.
  • HPGSGSZ is a valid segment size.
  • HPGRBRBA and HPGTORBA values are both within the current log range of the Db2 subsystem.

Some content is unavailable due to permissions.

also verifies that the header page fields HPGCLRSN, HPGLEVEL, and HPGPLEVL are within the current log range of the Db2 subsystem.

Table space map pages

For table space map pages,

Some content is unavailable due to permissions.

verifies the following items:

  • FOSMNENT values are consistent for nonsegmented table spaces.
  • SEGNUM values are consistent for segmented table spaces.
  • SEGSIZE values are consistent for segmented table spaces.
  • SEGFREE values are consistent for segmented table spaces.
  • SEGENT values are consistent for segmented table spaces.
  • SEGOBID and SEGFLAG values are correct for each segment entry for segmented table spaces.

Data pages

For data pages,

Some content is unavailable due to permissions.

verifies the following items:

  • The ID map entries and the ID map free chain are correct.
  • The large hole chains are correct.
  • The length and offset for each row or hole are correct.
  • PGFREE and PGFREEP values are correct.
  • PGMAXID values are correct.
  • The rows per page are within the maximum allowed.
  • Whether the page is a dictionary page.
  • No dictionary pages exist in catalog or directory spaces.
  • Whether the records are compressed.
  • No compressed records exist in catalog or directory spaces.
  • The PGSFLAGS record header flags are correct.

CHECKTSLEVEL 2

Important

CHECKTSLEVEL 2 is not valid for incremental copies.

When you specify CHECKTSLEVEL 2,

Some content is unavailable due to permissions.

provides all of the intrapage integrity checks listed for CHECKTSLEVEL 1 and also performs interpage checks. These are performed for both application table spaces and catalog and directory table spaces.

The following rules apply to CHECKTSLEVEL2:

  • CHECKTSLEVEL 2 is not available when you copy any of the following Db2 catalog or directory spaces:
    • DSNDB06.SYSCOPY
    • DSNDB01.SYSUTILX
    • DSNDB01.DBD01
    • DSNDB01.SYSDBDXA
  • If CHECKTSLEVEL 2 is specified with SHRLEVEL CONCURRENT PREFERRED and a consistent point cannot be obtained or maintained, the level of checking falls back to CHECKTSLEVEL 1.
  • If an incremental copy is produced as a result of using FULL AUTO or CHANGELIMIT, CHECKTSLEVEL 2 is reduced to CHECKTSLEVEL 1.
Warning

Specifying CHECKTSLEVEL 2 produces an error when you also specify any of the following options:

  • FULL NO for incremental copies
  • SHRLEVEL ANY or SHRLEVEL CHANGE
  • DSNUM integer for a multi-data-set, nonpartitioned table space

When you specify CHECKTSLEVEL 2,

Some content is unavailable due to permissions.

performs the following interpage checks:

  • Pointer records point to the correct overflow records.
  • Table segment chains are correct and all allocated segments are on one chain (and only one chain) for segmented table space.
  • HPGZNUMP agrees with the number of dictionary pages found.
  • If the header does not indicate the existence of a dictionary, no dictionary pages or compressed data records are found.
  • HPGSGSZ agrees with the SEGSIZE in the space map pages.
  • Dictionary pages are in the range indicated by the HPGZNUM and HPGZNUMP fields of the associated header page.

For table space map pages,

Some content is unavailable due to permissions.

checks the consistency of:

  • SEGLENT values for segmented table spaces
  • FOSMLENT values for non-segmented table spaces

When processing the Db2 catalog and directory spaces,

Some content is unavailable due to permissions.

also checks:

  • Hash chains in the directory
  • Ring pointer chains in the catalog to verify that the chains are intact

 

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