DOCS

Verifying a Database

You can verify the consistency of the inner structure of the ROISAM tables (physical consistency) or the consistency of all the data stored in the tables (logical consistency).

After a database backup or if you suspect that a database is inconsistent, you should examine—or verify—its physical and logical consistency. One sign of a logically inconsistent database is, for instance, that the same query, when repeated, returns different results.

  • To verify the physical consistency, call the program rodbucx<os> with the -check option.
  • To verify the logical consistency of a database, call the program rodbucx<os> with the -verify option. As the program runs, it logs any logical inconsistencies that it finds. Further, it writes into the log the actions necessary to restore logical consistency.

For z/OS, you can use the job RODBU to verify all databases that are specified in the SERVER section of the server initialization file.

Example (UNIX)

This command verifies the UNIX database described in the section DATA of the server initialization file:

rodbucxu ROSRV server.ini -v -db=DATA

Database verification comprises reading and examining all internal catalogs and all items contained therein.

The option -statistics in connection with the option -verify will cause statistical information to be returned about the number and size of attributes of the individual items.

The option -showmtr in connection with the options -verify, -repair, -dellock, and -size will produce output of maintenance information. This information includes a list of the following operations, the number of times an operation was used, the date it was last used, and a history of the last 200 operations including date and return code:

  • Server start (return code is always 0)
  • Container release (such as, -compress and -release)
  • Repair (such as, -repair)
  • Restore (such as, -restore)
  • Database recovery (such as, restore consistency after server abort)
  • Compress (such as, -compress)
  • Defragmentation (such as, -defrag)

When you verify databases, rodbucx<os> creates temporary files with default names:

Under Windows and UNIX, you can use the option -d=<directory> to specify a directory for the temporary files. If you do not use the -d option, rodbucx<os> uses the current directory.

You can specify your own temporary file names with these options:

Option Description

-sortfl<n>=<file>

File names for the sort files; <n> is a number from 1 to 6.

-numcat=<file>

Temporary file for information on the NUMFILE index.

-numbl=<file>

Temporary file for information on back links.

Under z/OS, the temporary files are specified via the ddnames SYSUT1 through SYSUT6, NUMBL, and NUMCAT in the job procedure #RODBU. If the default size specified in the SPACE parameter does not suffice for database verification, you must increase it appropriately. In addition, you can change the storage location for the files in these DD statements.

If rodbucx<os> detects errors during inspection of the index, there will be no further verification. At this point, you should start reconstruction of the database. For more information, see Defragmenting a Database.

In case of databases with several GB, verification requires considerable amounts of computing time (such as, up to several hours).