Kbase 19162: Dumping a Table While Having a Damaged Primary Index
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  16/10/2008 |
|
Status: Unverified
GOAL:
Dumping a Table While Having a Damaged Primary Index
GOAL:
How to dump a table when the Primary Index is damaged?
GOAL:
When the primary index is damaged how to dump a table?
CAUSE:
When you use the Dump data procedure from the Progress Data Dictionary, the primary index is used. Should that index be corrupted, and "idxbuild" fail, then you will need to dump "manually" your table.
FIX:
1) You may dump the tables using an alternate index. For example:
OUTPUT TO customer.d.
FOR EACH customer USE-INDEX name BY cust-num:
EXPORT customer.
END.
If you use a BY clause with the fields that form the primary index (cust-num for the customer table), you should obtain the same order as if you were using the Data Dictionary dump.
2) You may dump the tables without any index, running the following code:
DEFINE VARIABLE i AS INTEGER.
FIND _file "customer".
OUTPUT TO customer.d.
DO i = 1 TO 10000:
FIND customer WHERE RECID(customer) = i NO-ERROR.
IF AVAILABLE customer AND i <> INTEGER(_file._Template) THEN
EXPORT customer.
END.
The ending value of the above program (set to 10000 here) must be large enough so that every record in the database is examined.
A safe value to use is, for V6 V7 and V8 databases:
100 + number of records per block * (database size in bytes/database block size)