更新行时如何修复 informix 错误 -244

How to fix informix error -244 while updating row

好吧,我有一个程序可以更新 table 中的一行。这个程序每天执行大约 200 次。好吧,在 5-6 次后它给出了例外 -244。我认为有人用 select 打开了该行,而 sp 无法更新该行。 我试过的是将隔离设置为脏读,但它没有帮助...... 任何人都知道如何解决这个问题

这里解释了这个错误代码的含义

-244 Could not do a physical-order read to fetch next row.

The database server cannot read the disk page that contains a row of a table. Check the accompanying ISAM error code for more information. A hardware problem might exist, or the table or index might have been corrupted. If the query was using the dirty read isolation level, this error code may be normal behavior caused by reading data that was in a temporarily inconsistent state from a concurrent update on the same data.

Unless the ISAM error code or an operating-system message points to another cause, run the oncheck utility (secheck with IBM Informix SE or tbcheck with IBM Informix OnLine) to check and repair table and index.

如果是一个简单的锁定错误,如 113 'file is locked'(检查 ISAM 错误),您可以尝试增加 SPL 等待锁定 table 的时间。

更新前 'set lock mode to wait 10' 之类的东西可能会起作用。