Consultor Eletrônico



Kbase P20191: Possible fix for error 1422: Index in for recid could not be deleted - Post version 8.2x
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   11/2/2010
Status: Verified

SYMPTOM(s):

Attempts to delete records indicate the record can not be deleted.

Index <indexname> in <tablename> for recid <recid> could not be deleted. (1422)

Queries to the table return incorrect records.

Any query by index <x> fails whereas a query by index <y> succeeds.

FACT(s) (Environment):

Progress 8.2x
Progress 8.3x
Progress 9.x
All Supported Operating Systems
OpenEdge 10.x

CAUSE:

Currently no known cause has been attributed to this index corruption problem.
Queries to the table return incorrect records or indicate the record can not be deleted.
The index note is pointing to a different record.

FIX:

1) Export the data from the record by recid.
(This allows the data to be reviewed for accuracy and uniqueness. It also allows the record to be inserted back into the database if desired.)
example:

OUTPUT TO <filename>.
FOR EACH <tablename> WHERE RECID(<tablename>) = <recid of bad record>.
DISPLAY <tablename>.
OUTPUT CLOSE.
2) Remove the record from the database with the idxfix tool:
example:

proutil <dbname> -C idxfix
Enter selection:
6
Type the recid to delete.
<recid>
Type the area for the recid(s).
"<area name>"
Is this correct?
y

The problem could be due to a not unique value for field(s) part of a unique index. This can be checked by using the record's information in step1 and different queries searching for records that would have the same field data for the index fields that are unique. From this point, you will be able to confirm duplicity and decide to either delete all similar cases of duplicates or to modify the index definition to stop this happening again. ** It is only when attempting to delete that particular record, that the 1422 will return in the database log file. ** To investigate further the error, you could check if there are other records within that table which have problem with the same index.
You can either run "idxbuild" (off-line) or "idxfix" option 3.