Consultor Eletrônico



Kbase P123616: How to do Binary Dump and Load From DBRPR?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   30/07/2009
Status: Verified

GOAL:

How to do Binary Dump and Load From DBRPR?


GOAL:

Instructions on binary Dump and Load via DBRPR

GOAL:

Is there anyway to dump and load data if both regular ASCII and Binary dump and load fail?

FACT(s) (Environment):

All Supported Operating Systems
Progress/OpenEdge Versions

FIX:

If the master block of your database has been corrupted, or the index anchor blocks are damaged, it might be possible to recover from a good backup taken prior to the corruption. However, if a backup is not available and a dump and load of the data records cannot be performed, the following procedure can be performed as a last resort.

DO NOT use the following procedure to correct logical corruption orif there is extensive corruption in the database. Bad blocks will be skipped by this procedure, resulting in extensive data loss if there was extensive corruption.

NOTE: The dbrpr option of the proutil command is unsupported and undocumented by Progress Software. It is discussed only as a last resort option. Dbrpr is not tested, nor is it guaranteed to work in every case. The dbrpr option can be modified or made unavailable without notice.

In the following procedures, down.db refers to the existing corrupted database. Replace it with the name of your down db. Replace references to new.db with the name of your replacement databse.


1> Obtain a current version of the data definitions (.df) file for the database as it exists(with all current file, field, and index definitions. It can be from a prior backup or the latest version loaded, but it must be complete. Do not use a delta.df from an older incremental.

If the damaged database had any of its tables deleted, then dummy tables will have to be added to the .df file. To find that out run the following procedure against the database you will dump the .df from:

DEF VAR file-num AS INT NO-UNDO.
FOR EACH _file WHERE NOT _hidden BY _file-number file-num = 1 to 9999:
IF file-num <> _file-number THEN
MESSAGE "A table(s) was deleted immediatelly prior to " file-name
"table, you'll have to add dummy tables to the .df file".
DISPLAY file-num _file-number.
END.

Beware that if multiple tables were deleted at the same point, multiple dummy tables will have to be added. You'll have to compare file-num with _file-number to find out how many dummy tables to add at that point.

To make sure that you done everything correctly, compare the _file-number fields of the matching tables before and after the dump & load of the definitions if the _file-number is offset by 1 at table a,
you have to add a dummy table before table a.

A dummy table would look like this on the .df:

ADD TABLE "dummy10"

2> Type: proutil down.db -C dbrpr
Choose option 1, Database Scan Menu, then option 6, Dump Records to RM File. Choose G. G0, then at the next several prompts:
enter 0 for unlimited, specify the output filename, enter yes at the delete field place holders prompt. When all records have been dumped, the first dbrpr screen is displayed. Select Quit.

3> Type: prodb new.db empty
PROGRESS creates a new empty database. Be sure there is enough disk space for a full duplicate of your existing database in the file system you specify for the new.db.

4> Type: pro new.db
Enter the dictionary: from the PROGRESS editor, type dict and press F1; or select Dictionary Access from the PROGRESS help menu.
Choose Admin, then L for Load Definitions and Data, then D for Data Definitions from .df file. Specify the input file obtained in step 1.
This will load the database definitions from the .df file.

5> Type: proutil new.db -C dbrpr
Choose option 7. Load RM Dump File, specifying the file name created in step 2. Enter yes to delete place holders and 0 for the offset to begin at.

6> Type: proutil new.db -C idxbuild
Select All, and answer yes to the sorting prompt if disk space allows.