Kbase 16240: Advice on checking your Database regularly
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  5/10/1998 |
|
Advice on checking your Database regularly
INTRODUCTION:
=============
This Knowledgebase is to inform you how to check your database
regularly for obvious or severe corruptions.
WHY YOU NEED TO KNOW THIS:
===========================
If you back up your Progress database with a backup utility
provided by the Operating System or by a third party vendor you
will not detect corruption in the database. Such a backup just copies
the files to the backup media but does not check the contence of the
Database.
A Progress online backup or offline backup, either incremental or
full, performs a sanity check of the database blocks while backing
up. When you do not use the Progress backup utility probkup this
sanity check is not done and any corruption in the database is
not detected and can be in the database for a long time (maybe months)
before detected. Progress only reads a database block when it
is needed. Note that probkup will only detect block level corruption,
record level and index corruption will not be detected by probkup.
PROCEDURAL APPROACH:
====================
You can choose from three options:
1. Perform a Progress backup to the NULL device.
This will perform a Progress backup but not to a file on disk or
to a tape but to the so called 'bit bucket', the NULL device:
UNIX: probkup 'DATABASE NAME' /dev
ull
DOS: probkup 'DATABASE NAME' NUL
VMS: prog/backup 'DATABASE NAME' NL:
This lets probkup reads every database block and does a sanity
check on it and copies it to the NULL device.
2. Perform a scan with the dbrpr utlitily:
UNIX:
proutil 'DATABASE NAME' -C truncate bi # You must truncate the bi file
proutil 'DATABASE NAME' -C dbrpr << EOF 2>/dev
ull > 'OUTPUT FILE'
1
1
4
g
q
q
EOF
DOS:
proutil 'DATABASE NAME' -C truncate bi
_proutil demo -C dbrpr < 'KEY FILE' > 'OUTPUT FILE'
The KEY FILE must contain the keystrokes 1 1 4 g q q separated by
newlines. Create the keyfile with a text editor such as EDIT.
The output of dbrpr looks like this:
Scanning 'DATABASE NAME'
From dbkey 32 to dbkey 10976
Total Records: 2136
Continues: 78
# Dumped: 0
Progress version 8 has this scan function build in, you can run it
from command line: proutil 'DATABASE NAME' -C dbscan. It will perform
the same Database scan as the one described above.
If you have for example a wrong dbkey (1124) error in your database
you will see the error(s):
Can't find Blk 4 (128)
3. Perform a dbanalys on the Database:
proutil 'DATABASE NAME' -C dbanalys > dbanalys.out
This will generate an extensive report about the data and indexes in
the database. See the System Administration manual about details.
The advantage is that this utility not only generates a report but it
will read all data and indexes in the database. If there is a
corruption it will be reported. An other advantage is that it can be
run while the database is up and running. Be aware that in case the
dbanalys detects a severe corruption it will bring the server/broker
down.
If you do not use probkup it is best to run one of these checks
regularly, such as just before or just after your backup each night.
ONLINE PROCEDURES OR UTILITIES:
===============================
Probkup and proutil utilities.
REFERENCES TO WRITTEN DOCUMENTATION:
====================================
System Administration Guide and Reference.
NOTE: The database repair utility (dbrpr) is a non-documented and a
non-supported feature.
PJO 5 Aug 1997
Progress Software Technical Support Note # 16240