ADAVFY (Database Consistency Check)

This document describes the utility "ADAVFY".

The following topics are covered:


Functional Overview

The ADAVFY utility checks the consistency of the database. The General Control Block (GCB) is validated together with each File Control Block (FCB) and each Field Definition Table (FDT) of the loaded files. The index structure and Data Storage are validated. ADAVFY can also search for lost RABNs.

Running ADAVFY against an active nucleus, or running in parallel with utilities that perform database updates, may result in errors being reported. This is because further updates can be made before the utility terminates and some of these updates are only reflected in the nucleus buffer pool. ADAVFY does not require the Adabas nucleus to be active; it processes the database offline.

In general, ADAVFY only displays consistency errors that it detects and it does not modify the database. However, there are some errors in FCB and FDT that will be corrected by ADAVFY in offline mode when ADAVFY finds them, for example, an invalid value of the record counter in the FCB for the number of records in the file.

This utility is a multi-function utility.

Procedure Flow

graphics/adavfy.png

Data Set Environment
Variable/
Logical Name
Storage
Medium
Additional Information
Associator ASSOx Disk, Tape  
Data storage DATAx Disk, Tape  
Control statements stdin/
SYS$INPUT
  Utilities Manual
ADAVFY messages stdout/
SYS$OUTPUT
  Messages and Codes
Work WORK1 Disk, Tape  

Checkpoints

The utility writes no checkpoints.

Control Parameters

The following control parameters are available:

     AC

     

     DATA

M    DBID = number

D    ERRORS = number

     FCB

     FIELD

D    FILES = { * | (number [-number][,number[-number]]...)  }

     FROM = number - number

     INDEX

D    LEVEL = number

     LOB_REFERENCES

     LOST

     RECORD

The parameters AC, DATA, FCB, FIELD, INDEX, LOST and RECORD immediately invoke the corresponding verification function. The remaining parameters are only evaluated if they have been specified before such a parameter.

AC

AC

This function validates from the Address Converter to the Data Storage and checks that records can be found in the specified Data Storage for the files specified with the FILES parameter (see also DATA).

DATA

DATA

This function verifies Data Storage for the specified file number(s). This function validates from the Address Converter to the Data Storage and from the Data Storage to the Address Converter for the files specified with the FILES parameter. The ADAVFY DATA function corrects the following error in offline mode if it is detected: the FCB contains a record counter for the number of records in the file, and if this counter has an incorrect value, it will be corrected.

DBID

DBID = number

This parameter selects the database to be verified.

ERRORS

ERRORS = number

This parameter specifies the number of errors to be reported before the verification of a single file terminates. The minimum number allowed is 1. The default value is 20.

FCB

FCB

This function validates the file control block together with the Field Definition Table for the files specified with the FILES parameter (see also INDEX).

FIELD

FIELD

This function validates the Data Storage. It checks the record structure and validates the contents of unpacked, packed and floating point values for the specified files.

FILES

FILES = { * | (number[-number][,number[-number]]...)  }

This parameter specifies the files to be verified. If an asterisk `*' is entered, all files will be verified. The FILES parameter is required for all functions except the LOST function.

The default is no files.

FROM

FROM = number - number

The values specified are used in conjunction with the LEVEL option to print various structures. Please refer to the LEVEL parameter in this section for more detailed information.

INDEX

INDEX

This function verifies the complete index to level 1 (Normal Index). This includes verification of the FCB and FDT.

ADAVFY also counts the number of used, free, reusable and lost NI (Normal Index, index level 1), MI (Main Index, index level 2) and UI (Upper Index, index level 3 or greater) blocks.

Example:

  %ADAVFY-I-INDSTR, Index verification                              
  %ADAVFY-I-INDCNT, NI: used: 210, free: 1773, reusage: 17, lost: 0 
  %ADAVFY-I-INDCNT, UI: used: 1, free: 87, reusage: 2, lost: 1      
  %ADAVFY-I-INDCNT, MI: used: 9, free: 87, reusage: 2, lost: 1      
  %ADAVFY-I-INDEND, Index verification completed                    

Notes:

  1. Used index blocks are index blocks that are currently in use.
  2. Free index blocks are index blocks that have not yet been used.
  3. Reusable index blocks are index blocks that already have been used, but that have become empty again and were included in the reusage queue. These blocks can be used again.
  4. Lost index blocks are index blocks that are not currently used and that are missing in the reusage queue, and therefore cannot be used again. A value of 1 lost block is normal - this can happen after running ADAINV REINVERT.
  5. The number of free, reusable and lost MI and UI blocks is the same, because these blocks are taken from the same logical extent. Please note that the numbers displayed are the numbers for MI and UI together - if you use additional space for MI blocks, this also reduces the number of space available for UI blocks.

LEVEL

LEVEL = number

This parameter specifies how much information ADAVFY should output concerning the internal structures. Specifying this parameter does not affect the degree of verification performed. If this parameter is used, it must be specified before the function in question.

The default value is the highest possible index level plus 1.

with INDEX function

Level n prints information about index level n and higher
Level 0 prints more detailed structure of the index blocks

The FROM option is used to specify an index RABN range. Only the RABNs specified will be dumped.

with AC/DATA/RECORD/FIELD functions

Level 2 prints which RABNs processed
Level 1 prints record structure (when RECORD or FIELD is used), or where each ISN points (when DATA or AC is used), or which ISN with LOB ID is verified (when LOB_REFERENCES is used)
Level 0 dumps fields within records

with LOB_REFERENCES function

Level 0 dumps the ISN with LOB ID list found from the base file, and ISN with LOB record from the LOB file

with LOST function

Level 0 dumps the physical structure of the database

LOB_REFERENCES

This function verifies LOB references between the LOB file and the base file.

LOST

LOST

If this option is specified, ADAVFY searches for lost RABNs in the database. If any lost RABNs are found, the space can be recovered by using the RECOVER function of ADADBM.

RECORD

RECORD

This function validates the Data Storage and checks the structure of each record for the specified files (see also FIELD).

Examples

Example 1

adavfy: dbid=3,file=*,data,field,index

All files of database 3 are validated using the functions DATA, FIELD and INDEX. This combination of functions gives the maximum degree of validation.

Example 2

adavfy: dbid=3, file=7, level=1, field

File 7 of database 3 is validated. The record structure in Data Storage is validated, as well as the contents of unpacked, packed and floating point fields. ADAVFY prints a list of the RABNs which have been processed and, for each record processed, its offset in the corresponding RABN, its length and its ISN.