Consultor Eletrônico



Kbase P129563: What tools / utilities can I run to check the integrity of a database or check for corruption?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   17/08/2010
Status: Verified

GOAL:

How to scan a database online to identify database integrity?

GOAL:

How to troubleshoot database corruption?

GOAL:

How to troubleshoot index corruption?

GOAL:

What commands can be used to scan a database for overall integrity?

GOAL:

What commands can be used to validate the integrity of a database?

GOAL:

When would -DbCheck be used?

GOAL:

When would -MemCheck be used?

GOAL:

What tools are available for scanning a database for integrity when a database is online?

GOAL:

What tools are available for scanning a copy of a production database?

GOAL:

How to scan a database for integrity and minimize the impact associated with the scan process?

GOAL:

How to use dbtool to scan a database for integrity?

GOAL:

How to use dbtool to scan a database?

GOAL:

How to scan a database for integrity while minimizing impact to production environment?

GOAL:

What tools / utilities can I run to check the integrity of a database or check for corruption?

FACT(s) (Environment):

All Supported Operating Systems
OpenEdge Category: Database
OpenEdge 10.1B
OpenEdge 10.1C
OpenEdge 10.2x

FIX:

The Progress OpenEdge dbtool, idxfix and idxcheck utilities can be ran online or offline and are useful in identifying physical data corruption within a database. Logical data integrity on the other hand can only be verified by running application specific ABL code. Typically, there should be no need to do so provided that the database has never been forced into by either skipping crash recovery or running prostrct repair operations. This discussion of Logical Data Integrity checks is out of scope in this Solution.

When dealing with the online production database, it is essential to limit the performance impact of the scans being run. For this reason, the following recommendations are broken out by environment:

A. In a production environment, the following tools should be used:

1. For verification of database blocks use: dbtool - option 5 (Read or Validate Database Block(s))
This dbtool option reads all the blocks in the database and validates the block headers, similar to a full probkup. Select a verbose and validation level of 0 for the scan. This is a minimal impact production performance.

Command: dbtool dbname

2. For verification of index block and content use: idxcheck
The proutil idxcheck functionality will perform a cursory index block level check for a the entire database, or a table, area or schema owner level. As this utility can be run online, it can also be run in parallel to the dbtool command above.

Command: proutil dbname -C idxcheck [all | table [owner-name.]table-name | area area-name | schema schema-owner] -TB 24 -TM 32

3. When rolling forward ai files, the -MemCheck and -DbCheck parameters can be used to ensure that there are no problems applying the ai transaction notes themselves.
The -MemCheck parameter performs a memory consistency check.
The -DbCheck option enables a database consistency check for all index and record blocks except BLOB blocks for the entire database.
Should a problem be detected when rolling forward an ai file, an error will be presented and the roll forward option will fail as a result without applying the notes to the hot standby/backup.

Command: rfutil dbname -C roll forward -a /pathnametoaifile/aifile -MemCheck -DbCheck

B. When dealing with a copy of a production database, the following tools should be used:

dbtool - option 3 (Record Validation). This option of dbtool can impact database performance and that is why it is typically reserved for scanning a back up or a copy of a production database. This option performs a record level validation. It puts the records together in an effort to ensure that the record is properly formatted and accessible in every block.

Command: dbtool dbname

For verification of indexes, use idxfix option 3 which does (1. Scan records for missing index entries and 2. Scan indexes for invalid index entries). This option for idxfix will check database records and indexes to determine whether an index is corrupt or a record has a missing or incorrect index. This utility can also repair corrupted indexes.

Command: proutil dbname -C idxfix