Consultor Eletrônico



Kbase P6092: Checking your database for corruption when using OS backups
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   27/07/2010
Status: Verified

GOAL:

Checking your database for corruption when using OS backups

GOAL:

Caution when using OS backups

GOAL:

Evaluating 1124 error messages for database corruption

GOAL:

Advice on checking your database for corruption

FIX:

This Solution has been written to advise on the use of Progress utilities to check your database regularly for obvious or severe corruption.

If your Progress database is backed up with a backup utility provided by the Operating System or a Third Party vendor, you will not be alerted to corruption in the database. Such a backup just copies the files to the backup media but does not check the contents of the Database.

A Progress online backup or offline backup, either incremental or full, on the other hand performs a sanity check of the database blocks while backing up. Each block is verified as a valid block before being buffered to memory then flushed to disc. When you do not use the Progress backup utility (probkup), this sanity check is not done. Any corruption in the database is not detected and can be in the database for a long time (maybe months) before encountered, because Progress only reads a database block when it is needed again. Note that probkup will only detect block level corruption, record level and index corruption can be detected by using the dbanalys utility.
If you do not use probkup, it is best to run one of the following checks regularly, such as just before your backup each night. There are three options to choose from:

1.) Perform a Progress backup to the NULL device.

This will perform a Progress backup but not to a file on disk or tape, but to the so called 'bit bucket', the NULL device:

UNIX: probkup <dbname> /dev
ull
DOS: probkup <dbname> NUL

This lets probkup read every database block, do a sanity check on it and copy it to the NULL device. It will also give you an idea of how much disc space is needed for the OS backup, to ensure that sufficient resource for this routine are (still) available as the database grows in time.


2.) Perform a database scan.

A scan utility was introduced in Progress 8.x which can be run from the command line:

$ proutil dbname -C dbscan

The output will look similar to this:

Scanning dbname
From dbkey 32 to dbkey 10976

Total Records: 2136
Continues: 78
# Dumped: 0

If you have a wrong dbkey (1124) error in your database, appropriate error(s) will be displayed:

Can't find Blk 4 (128)


3. Perform a dbanalys on the Database:

[PRE OE 10.1B] $ proutil dbname -C dbanalys > dbanalys.out
[POST OE 10.1B] $ proutil dbname -C dbanalys -scan > dbanalys.out

This will generate an extensive report about the data and indexes in the database. The advantage is that this utility not only generates a report but it will read all data and indexes in the database. If there are corruption, it will be reported. Another advantage is that it can be run while the database is up and running. Be aware however, that if dbanalys detects severe corruption it will bring the server/broker down, if run live.