DBIRepair

Top  Previous  Next

DBIRepair.exe is a command-line tool for scripting Petra database verification, repair, reindexing, and optimization.

DBIRepair.exe is able to accept a full path filename to a single Petra table (with automatic VERIFY and REPAIR, if necessary) with parameter switches for FORCEREPAIR, REINDEX and/or OPTIMIZE (for scripting).  DBIRepair.exe requires exclusive access to the table (all users must be out of the project).  There is a separate report .txt file created with the same name as the table in the same folder as the table for each table processed containing any exceptions during the process.

The format for the command line is:

DBIRepair.exe fully_qualified_path_and_table_file_name \FORCEREPAIR\REINDEX \OPTIMIZE

Fully_qualified_path_and_table_file_ name        Specifies the full path to the Petra

database table (see note 1)

\FORCEREPAIR                                        Forces a full repair of the table

(optional, see note 2)

 \REINDEX                                                Reindexes the table

(optional – see note 3)

 \OPTIMIZE                                                Optimizes the table

(optional – see note 4)

Notes:

1.

DBIRepair.exe with just the fully qualified path and table file name on the command line will automatically perform a Verify.  It will automatically perform a Repair, if it is found necessary by the Verify.  This is the safest and fastest option, since a Verify only reads the data and doesn’t have to write any data to a new table.

2.

\FORCEREPAIR is optional and will bypass the Verify and force a Repair even if it is not necessary.  This is a longer process as it has to create a new table to write the data into.

3.

\REINDEX is optional and will delete the existing index(es) on a table and create them again from scratch.

4.

\OPTIMIZE is optional.  It will create a new table and write the existing data in the order of the primary key index, effectively shrinking the file size by eliminating any deleted data.  It will speed up data access somewhat as the data will now be stored on disk in the actual index order.

5.

All users must be out of the project before any repair processes are started.

6.

Backup (copy and zip) your Petra project folder before any repairs are undertaken.

embim407

embim408