Re: Update failed question
Posted in 1995
In article <3lchsj$qlj@ftcnews.nrcs.usda.gov>, Tammy Croteau <tammy@scooter> wrote: |I am using Infomix SE v5. I am going through a series of |updates embedded within a BEGIN/COMMIT transaction. About |half way through I am getting an error (Informix -346, |CISAM -121) which seems to indicate that 1) either the |disk is full or 2) the transaction log is having problems. Actually, I *suspect* you may be running out of record locks in the O/S. |I have plenty of space on my hard disk and the transaction |log is quite small, additionally no other users are in the |database so records are not locked and neither the index or |the database is corrupt. I can update the same |number of records if each update is treated as one transaction |or if I update the entire table through ISQL. | | |works |for (i=0; i<600; i++) { | $BEGIN | $UPDATE .... | $COMMIT |} This will certainly work, as each update gets its own transaction, and only one exclusive record lock is held for the table by the process at a time. |fails |$BEGIN |for (i=0; i<600; i++) { | $UPDATE .... |} |$COMMIT | |Any suggestions or solutions? |Tammy 1) If you can live with having the table locked during the update: $BEGIN $LOCK TABLE <tablename> IN EXCLUSIVE MODE for (i=0; i<600; i++) { $UPDATE .... } $COMMIT The COMMIT will unlock the table. 2) If you CAN NOT live with having the table locked during the update, you must expand the number of record locks allowed/provided by the kernel, or do the updates in smaller pieces. | Tamara J. Croteau | tcroteau@ftc.nrcs.usda.gov | CDSI | tammy@ftc.nrcs.usda.gov -- Alan Denney aland@informix.com "I thought she (Tarzan's Jane) was a real wimp and that I would have made a better mate for Tarzan." -- Jane Goodall