Consultor Eletrônico



Kbase P104680: Possible fix for error 1422: Index in for recid could not be deleted - Pre version 8.2x
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   16/05/2011
Status: Verified

SYMPTOM(s):

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

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

Queries to the table return incorrect records.

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

FACT(s) (Environment):

Progress 6.x
Progress 7.x
Progress 8.0x
Progress 8.1x

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:

Make sure that you have a reliable database backup before undertaking the following steps.

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 needed.)
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 following pseudo 4GL code:


FOR EACH <table_name> WHERE RECID(<table_name>) = <recid in error 1422>
DELETE <table_name>.
3) ReBuild the index that you just removed the record from.


proutil <dbname> -C idxbuild -TB 24 -TM 32 -G 0
enter some
enter tablename
enter the index to rebuild
enter ! on a line of its own when you have entered all the indices to rebuild for the table(s) involved

Alternatively, run a full idxbuild operation on all tables and indexes.

Once you've carried out the steps listed above, it would be worth finding out IF the record in question was unique or not by using that recid provided (STEP 1 above). The RECID is unique across the database in pre version 9 databases.

Then look at the record and use this information to structure further queries to look for records that 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 that particular record is accessed, that the 1422 will return in the logfile. **