Trapping database corrption using probkup

runnerbeans

New Member
Hi all

I am trying to write a script that will trap db corrption. I run an online backup and then run a verify using the -vp option. If the database is corrupt is there some output this command will give that indicates this? If so what would the string be, I don't have a corrupt database to run the command against.

Any help much appreciated

Cheers
 
What sort of corruption?

A Probkup actually performs a block scan of the database and will be unsuccessful if there is block level corruption.

A prorest -vp is really just a media check that the blocks have been successfully written to the media...

The old proutil dbrpr scan may provide some benefit on this, but will require a restored version of the database.
 

dje

New Member
Just an additional point, verify doesn't make any sense in the case of an online backup so Progress ignores your -vp switch when you request an online backup. This is because it can't guarantee that blocks haven't changed as a result of normal backup activity between the time of the backup and the subsequent verify.

- David Eddy
 

runnerbeans

New Member
toby.Harman said:
What sort of corruption?

A Probkup actually performs a block scan of the database and will be unsuccessful if there is block level corruption.

A prorest -vp is really just a media check that the blocks have been successfully written to the media...

The old proutil dbrpr scan may provide some benefit on this, but will require a restored version of the database.

I guess then what I want to check is block level corruption. I want to have this as part of nightly backup. i.e. back the db up using probkup online and then output the result to a log file and then test for a string from the commands output that indicates corruption. Can you give me a list of things that Progress could output when the probkup command detects block level corruption.

Is it only dbrpr that you can use to detect record corruption?

Many Thanks
 
Probkup is quite nice for this because by default it doesn't put too many messages out.

I don't know what (if any) error codes can be trapped from it. You may be better scanning the output for completion strings like "Backup Complete" and reporting if they are not there.

The other alternative to scan the database is to run proutil -C dbanalys. This will do a record level scan in terms of checking that they are all there, but will not guarantee data quality (orphaned records etc). I am not aware of any utility which can deal with orphaned records. You could write one!
 

KWSMaster

New Member
toby.Harman said:
Probkup is quite nice for this because by default it doesn't put too many messages out.

I don't know what (if any) error codes can be trapped from it. You may be better scanning the output for completion strings like "Backup Complete" and reporting if they are not there.

The other alternative to scan the database is to run proutil -C dbanalys. This will do a record level scan in terms of checking that they are all there, but will not guarantee data quality (orphaned records etc). I am not aware of any utility which can deal with orphaned records. You could write one!

One thing to remember with dbanalys is that it ONLY scans data blocks. Index block corruption can only be detected using idxcheck, but at this time idxcheck is terribly slow, especially with word indexes. dbrpr works well, but is an unsupported utility.

We have seen index corruption cases that are completely invisible to Progress until the index block that is corrupted is accessed, then suddenly the database dies a horrible, unrecoverable death with a (49) error. :eek: Be sure to have that ai running!

What we have been doing is running an online dbanalys nightly to monitor the database, and every couple of weeks I run an idxanalysis on a restored database on our development box to check indexes. However, we are on SCO UnixWare, so this is a necessary issue with the current unsolved corruption issues in the 9.1C and D versions on that platform.
 
Interesting - So where does dbanalys get the index information it produces from?

It reports the number of entries - maximum B-Tree depth - total size etc which must come from somewhere.

Anyone have any clues?
 

KWSMaster

New Member
toby.Harman said:
Interesting - So where does dbanalys get the index information it produces from?

It reports the number of entries - maximum B-Tree depth - total size etc which must come from somewhere.

Anyone have any clues?

I think most of this data is gotten using the index blocks -- a dbanalys and idxanalys both parse through all the blocks in the database and assemble record and index summaries, but the indexes themselves are NOT scanned for corruption. They are simply scanned for size/b-tree node count, etc. The analys code does not CHECK the actual entries for validity. Doing so would slow the utility by several orders of magnitude depending on the number of indexes, and the number of word indexes.

Please note, when doing an idxcheck or idxbuild, the number of word indexes can greatly affect performance. Word indexes are by far the slowest part of the Progress data engine to verify and rebuild.
 
This being a given - the only way I can conveniently think of to fully check the indices would be to restore the backup to another device and use proutil dbrpr to scan the disks...
 

runnerbeans

New Member
toby.Harman said:
This being a given - the only way I can conveniently think of to fully check the indices would be to restore the backup to another device and use proutil dbrpr to scan the disks...

Thanks for all your replies, much appreciated. Remember I am wanting to fit this into my online backup routine and wanted to trap corruption from this. Is there an errorlevel that I can trap when I return the probkup command?

Sugs
 
Top