Integ

The INTEG command performs an integrity check on a GT.M database file. INTEG operates on one or more regions in the current Global Directory, and suspends concurrent updates to those regions during its operation. INTEG of a single file database, without a Global Directory, requires exclusive (standalone) access to that file. The order in which INTEG selects database regions is a function of file system layout and may vary as files are moved or created. If you want to generate an integ where the output always lists database files in a predictable sequence, run the integs one at a time. For example, to compare output with a reference file, run INTEG on one file at a time.

Use INTEG at the following times:

  • Periodically - to ensure ongoing integrity of the database(s); regular INTEGs help detect integrity problems before they spread throughout the database file.

  • After a crash - to ensure the database was not corrupted. (Note: When using before-image journaling, when the database is recovered from the journal file after a crash, an integ is not required).

  • When database errors are reported - to troubleshoot the problem.

The format of the INTEG command is:

       
            I[NTEG] [/qualifier[...]] [/FILE] file-specification | /REGION region-name
       
       
         

INTEG requires the specification of either file(s) or region(s).

The available qualifiers are:

  • /A[DJACENCY]=integer

  • /BL[OCK]=block-number

  • /BR[IEF]

  • /FA[ST]

  • /FI[LE] file-name

  • /FU[LL]

  • /[NO]K[EYRANGES]

  • /[NO]MAP[=integer]

  • /[NO]MAXK[EYSIZE][=integer]

  • /[NO]TR[ANSACTION][=integer]

  • /R[EGION] region-name

  • /S[UBSCRIPT]=subscript

  • /TN[_RESET]

The file-specification directly identifies the database file to INTEG. The region-list identifies one or more regions that, in turn, identify database files through the current Global Directory.

Analyze errors reported by INTEG immediately, to prevent further corruption. Fidelity strongly recommends fixing the following errors as soon as they are discovered:

  • Blocks incorrectly marked free - these may cause accelerating damage when processes make updates to any part of the database region.

  • Integrity errors in an index block - these may cause accelerating damage when processes make updates to that area of the database region using the faulty index. Refer to the "Maintaing Database Integrity" chapter for more information.

INTEG /FAST and the "regular" INTEG both report these errors. Other database errors do not pose the threat of rapidly spreading problems in GDS files. However, if operations continue, the errors may cause the following problems:

  • Invalid application operation due to missing or incorrect data

  • Process errors, including inappropriate indefinite looping, when a database access encounters an error

  • Degrading application level consistency as a result of incomplete update sequences caused by the prior symptoms

When you repair the GT.M database you must assess the type of damage, the risk of continued operations, and the disruption in normal operation caused by the time spent repairing the database. For information on analyzing and correcting database errors, refer to the "Maintaining Database Integrity" chapter. Contact your regular GT.M support for help assessing INTEG errors.

<CTRL-C> or <CTRL-Y> stops INTEG before the process completes.

/A[DJACENCY]=integer

Specifies the range of blocks that INTEG considers a block adjacent to another database block on the same level. The adjacency report from INTEG gives an approximation of physical data density which directly affects efficient database access. In effect, this measures how well a database is organized. Implementing a high degree of adjacency improves system response time. Use the /ADJACENCY qualifier to adjust the reporting to reflect characteristics of your disks. For example, select a factor that matches the number of sectors on a drive. To improve the adjacency, use MUPIP REORG.

-By default, INTEG uses /ADJACENCY=10.

/BL[OCK]=block-number

Specifies the block at which to start checking a sub-tree of the database. /BLOCK cannot detect "incorrectly marked busy errors." Block numbers are displayed in an INTEG error report or by using DSE.

The /BLOCK qualifier is incompatible with the /SUBSCRIPT and /TN_RESET qualifiers.

/BR[IEF]

Specifies an INTEG summary report which displays the total number of directory, index and data blocks. The /BRIEF qualifier is incompatible with the /FULL qualifier.

By default, INTEG reports are /BRIEF.

/FA[ST]

Specifies that INTEG checks only index blocks. INTEG /FAST does not check data blocks. INTEG /FAST produces results significantly faster than a full INTEG because the majority of blocks in a typical database are data blocks. While INTEG /FAST is not a replacement for a full INTEG, it very quickly detects those errors that must be repaired immediately to prevent accelerated database damage.

The /FAST qualifier is incompatible with the /TN_RESET qualifier.

By default, INTEG checks all active index and data blocks in the database.

/FI[LE]

Specifies that the parameter to the INTEG command is a file-specification . INTEG FILE requires exclusive (stand-alone) access to a database file and does not require a Global Directory. Because it has stand-alone access to the file, INTEG /FILE is able to check whether the reference count is zero. A non-zero reference count is indicative of the prior abnormal termination of the database.

The /FILE qualifier is incompatible with the /REGION qualifier.

By default, INTEG operates /FILE.

/FU[LL]

Specifies an expanded INTEG report which displays the number of index and data blocks in the directory tree and in each global variable tree as well as the total number of directory, index and data blocks. The /FULL qualifier is incompatible with the /BRIEF qualifier.

By default, INTEG reports are /BRIEF.

/[NO]K[EYRANGES]

Specifies whether or not the INTEG report includes key ranges that identify the data suspected of problems detected by INTEG.

By default, INTEG displays /KEYRANGES

/[NO]MAP[=integer]

Specifies the maximum number of "incorrectly marked busy errors" that INTEG reports.

/NOMAP removes limits on incorrectly marked busy reporting so that INTEG reports all map errors. /NOMAP does not accept assignment of an argument.

[Note] Note

Because incorrectly marked free errors are very dangerous, INTEG always reports them, and /MAP does not affect them.

An error in an index block prevents INTEG from processing potentially large areas of the database. A single "primary" error may cause large numbers of "secondary" incorrectly marked busy errors. Because "real" or primary incorrectly marked busy errors only make "empty" blocks unavailable to the system, they are low impact and do not require immediate repair.

[Note] Note

After a system crash and a database recovery with MUPIP recover or rollback, the database can legitimately have benign, incorrectly marked busy errors. These errors do not require immediate repair. Schedule repairs for the next convenient opportunity.

By default, INTEG reports a maximum of 10 map errors (/MAP=10).

/[NO]MAX[KEYSIZE][=integer]

Specifies the maximum number of "key size too large" errors that INTEG reports.

/NOMAXKEYSIZE removes limits on key size reporting so that INTEG reports all key size too large errors. /NOMAXKEYSIZE does not accept assignment of an argument.

"Key size too large" errors should normally only occur after you use DSE CHANGE /FILEHEADER /KEY_MAX_SIZE to reduce the maximum key size.

By default, INTEG reports a maximum of 10 key size errors (/MAXKEYSIZE=10).

/[NO]TR[ANSACTION][=integer]

Specifies the maximum number of block transaction- number-too-large errors that INTEG reports.

/NOTRANSACTION removes limits on transaction reporting so INTEG reports all transaction number errors. /NOTRANSACTION does not accept assignment of an argument.

A system crash may generate many "block transaction number too large" errors. These errors can cause problems for BACKUP /INCREMENTAL and for transaction processing. Normally, the automatic increment of 1000 blocks that GT.M adds when a database is reopened averts these errors. If a problem still exists after the database is reopened, you can use a value in the DSE CHANGE /FILEHEADER /CURRENT_TN= command to quickly fix "block transaction number too large number" errors.

By default, INTEG reports a maximum of 10 block transaction errors (/TRANSACTION=10).

/R[EGION]

Specifies that the INTEG parameter identifies one or more regions rather than a database file.

INTEG /REGION does not require sole access to databases. Instead, it freezes updates to the database during the check. The region-name argument may specify more than one region of the current Global Directory in a list separated with commas. Any region name may include the DCL wildcard characters * and %. INTEG /REGION requires the logical name GTM$GBLDIR to specify a valid Global Directory. For more information on defining GTM$GBLDIR, refer to the "Global Directory Editor" chapter.

[Note] Note

Because a KILL may briefly defer marking the blocks it releases "free" in the bit maps, INTEG /REGION may report spurious block incorrectly marked busy errors. These errors are benign. If these errors occur in conjunction with a "Kill in progress" error, resolve the errors after the "Kill in progress" error is no longer present.

THe /REGION qualifier is incompatible with the /FILE and /TN_RESET qualifiers.

By default, INTEG operates /FILE.

/S[UBSCRIPT]=subscript

Specifies a global or a range of keys to INTEG. The global key may be enclosed in quotation marks (" "). Identify a range by separating two subscripts with a colon (:). /SUBSCRIPT cannot detect incorrectly marked busy errors.

Use /SUBSCRIPT only if you know the path to the keys in the subscript, and have reason to believe the path is not damaged. If the path is questionable or known to be damaged, use DSE to find the block(s) and INTEG /BLOCK.

The /SUBSCRIPT qualifier is incompatible with the /BLOCK and /TN_RESET qualifiers.

Use /FULL to have INTEG report all global names in a region or list of regions.

Example:

       MUPIP> INTEG /SUBSCRIPT="^a(100)":"^b(""c"")" /REGION $DEFAULT
       

This INTEGs all global variables greater than or equal to ^a (100) and less than or equal to ^b("c") in the default region(s).

[Note] Note

To specify a literal in the command string, use double quotation marks for example, ^b(""c"").

/TN[_RESET]

Instructs an INTEG /FILE to reset the transaction number to one (1) in every database block currently holding valid data.

The /TN_RESET qualifier rewrites all blocks holding data. If the transaction overflow resets to zero (0) database operation is disrupted. The /TN_RESET qualifier is a protective mechanism that prevents the transaction overflow from resetting to 0.

Transaction numbers can go up to 4,294,967,295 (2**32-1). When the current transaction number exceeds four billion, INTEG displays a message warning that the transaction number is approaching the limit of the database. Because the warning appears when the transaction number reaches four billion, INTEG provides a margin of nearly 300 million updates before failure to perform the INTEG /TN_RESET causes the database to fail. This should give you adequate time to schedule an INTEG /TN_RESET. If you use MUPIP EXTRACT, delete the file and then MUPIP CREATE and MUPIP LOAD, the procedures have the same effect as a /TN_RESET.

[Note] Note

Any time a GT.M update opens a database file that was not properly closed, GT.M increments the transaction number by 1000. This automatic increment prevents problems induced by abnormal database closes, but it should be considered in your operational procedures. The rate at which GT.M "uses up" transaction numbers is a function of operational procedures and real database updates.

The /TN_RESET qualifier is incompatible with the /FAST, /BLOCK, /REGION, and /SUBSCRIPT qualifiers.

By default, INTEG does not modify the block transaction numbers.