Help with Transaction Log !! Urgent!!!
Posted in 2004
A user running Informix 6.05 (Standard Engine) on HP-UX 11.11 reported that updates touching more than ~100 rows failed with error 346 / ISAM 121 "cannot write log record", even though the filesystem had plenty of space; truncating the ~25MB transaction log with cat /dev/null didn't help. Respondents debated whether it was SE or OnLine, warned against deleting the log (especially while users are connected, which can corrupt data), doubted any 100-row transaction limit, and suggested checking the install, kernel semaphore settings, whether the application commits at row 100, and running bcheck on the tables with all users off. No confirmed cause or fix is recorded in the thread.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Error Codes & Troubleshooting, Server Administration, Transactions, Locking & Isolation
Hello...
I am using Informix 6.05 on HPUX 11.11 and whenever I try a large
update (well, anything more than about 100 records), I get the
following error
346: Could not update a row in the table.
121: ISAM error: cannot write log record
This database has a log file which is huge - about 25 MB. But the
file system is not full. The volume is only about 25% full. I
thought maybe the log file was too big and so tried to empty the log
file by cat /dev/null to the transaction log but I still get the same
error message. I have no problems with selects, inserts and deletes;
just updates.
I am not really an Informix DBA and don't have a whole lot of
experience in Informix.., I inherited this db and any help would be
appreciated. I have already looked at previous posts on this
newsgroup, but didn't find anything which I could use.
Would removing the transaction log completely help? How do I do that?
Thanks,
Kishore
Are you sure about 6.05? Could you post the output of "onstat -V".
No removing the txn log file is not a good idea....
"Kishore Bhageshpur" <kishore_b@hotmail.com> wrote in message
news:73ea6c9.0406290558.1933864c@posting.google.com...
> Hello...
>
> I am using Informix 6.05 on HPUX 11.11 and whenever I try a large
> update (well, anything more than about 100 records), I get the
> following error
> 346: Could not update a row in the table.
> 121: ISAM error: cannot write log record>
> This database has a log file which is huge - about 25 MB. But the
> file system is not full. The volume is only about 25% full. I
> thought maybe the log file was too big and so tried to empty the log
> file by cat /dev/null to the transaction log but I still get the same
> error message. I have no problems with selects, inserts and deletes;
> just updates.
>
> I am not really an Informix DBA and don't have a whole lot of
> experience in Informix.., I inherited this db and any help would be
> appreciated. I have already looked at previous posts on this
> newsgroup, but didn't find anything which I could use.
>
> Would removing the transaction log completely help? How do I do that?
>
> Thanks,
> Kishore
"Madison Pruet" <mpruet@comcast.net> wrote in message news:dlfEc.197076$Ly.67842@attbi_s01...
> Are you sure about 6.05? Could you post the output of "onstat -V".
>
>
> No removing the txn log file is not a good idea....
onstat !!!
I thought it is fairly obvious that he is talking about Standard Engine.
ISAM error 121 seem to be too SE centric.
>
>
> "Kishore Bhageshpur" <kishore_b@hotmail.com> wrote in message
> news:73ea6c9.0406290558.1933864c@posting.google.com...
> > Hello...
> >
> > I am using Informix 6.05 on HPUX 11.11 and whenever I try a large
> > update (well, anything more than about 100 records), I get the
> > following error
> > 346: Could not update a row in the table.
> > 121: ISAM error: cannot write log record> >
> > This database has a log file which is huge - about 25 MB. But the
> > file system is not full. The volume is only about 25% full. I
> > thought maybe the log file was too big and so tried to empty the log
> > file by cat /dev/null to the transaction log but I still get the same
> > error message. I have no problems with selects, inserts and deletes;
> > just updates.
> >
> > I am not really an Informix DBA and don't have a whole lot of
> > experience in Informix.., I inherited this db and any help would be
> > appreciated. I have already looked at previous posts on this
> > newsgroup, but didn't find anything which I could use.
> >
> > Would removing the transaction log completely help? How do I do that?
> >
> > Thanks,
> > Kishore
>
>
A lot of ISAM code is embedded in online as well. That's why we have
SQLCODE and also return an ISAM error code in the sqlca.sqlerrd[1] field.
Last time I checked, there were some 30 odd places in the code were we might
return a -121 error code.
Just because we get an ISAM error code (including an ISAM 121) does not mean
that the engine is SE.
"rkusenet" <rkusenet@sympatico.ca> wrote in message
news:2kdf1pFsu0fU1@uni-berlin.de...
>
> "Madison Pruet" <mpruet@comcast.net> wrote in message
news:dlfEc.197076$Ly.67842@attbi_s01...
> > Are you sure about 6.05? Could you post the output of "onstat -V".
> >
> >
> > No removing the txn log file is not a good idea....
>
> onstat !!!
> I thought it is fairly obvious that he is talking about Standard Engine.
> ISAM error 121 seem to be too SE centric.>
> >
> >
> > "Kishore Bhageshpur" <kishore_b@hotmail.com> wrote in message
> > news:73ea6c9.0406290558.1933864c@posting.google.com...
> > > Hello...
> > >
> > > I am using Informix 6.05 on HPUX 11.11 and whenever I try a large
> > > update (well, anything more than about 100 records), I get the
> > > following error
> > > 346: Could not update a row in the table.
> > > 121: ISAM error: cannot write log record> > >
> > > This database has a log file which is huge - about 25 MB. But the
> > > file system is not full. The volume is only about 25% full. I
> > > thought maybe the log file was too big and so tried to empty the log
> > > file by cat /dev/null to the transaction log but I still get the same
> > > error message. I have no problems with selects, inserts and deletes;
> > > just updates.
> > >
> > > I am not really an Informix DBA and don't have a whole lot of
> > > experience in Informix.., I inherited this db and any help would be
> > > appreciated. I have already looked at previous posts on this
> > > newsgroup, but didn't find anything which I could use.
> > >
> > > Would removing the transaction log completely help? How do I do that?
> > >
> > > Thanks,
> > > Kishore
> >
> >
>
>
Madison Pruet wrote: > > Just because we get an ISAM error code (including an ISAM 121) does > not mean that the engine is SE. No, but talking about removing the transaction log file implies SE to me. Like everyone else, haven't seen SE for 10 years....
Probably, but you can 'rm' a chunk if it is a file.... ;-) M.P. "Andrew Hamm" <ahamm@mail.com> wrote in message news:2kedqmF1ei9gU1@uni-berlin.de... > Madison Pruet wrote: > > > > Just because we get an ISAM error code (including an ISAM 121) does > > not mean that the engine is SE. > > No, but talking about removing the transaction log file implies SE to me. > Like everyone else, haven't seen SE for 10 years.... > >
Madison Pruet wrote: > Probably, but you can 'rm' a chunk if it is a file.... ;-) true - even scarier. However, I assume the engine will explode fairly rapidly after that - esp. if catting /dev/null to it was applied (that was said?) rather than removing it. If "removed" on UNIX i think it would probably keep running until the next restart due to the dangling reference via the unclosed file handle? Anyways :>> onto the actual problem. I can't believe the claims that SE has a limit on the size of a transaction that is small enough to manifest with 100 rows. That's a load of cobblers - 10 years ago when I did use SE i know it did far more work than that. I'm sort-of with Five Cats, questioning the correctness of the install, but I don't know why or how such a peculiar problem can manifest due to a bad file permission. What about semaphores in the kernel? SE used semaphores, correct? But how many need to be configured? We might need to know what machine it is because I think the implementation of locking is platform dependent. What's in the actual code? Is it actually trying to do a COMMIT at the 100'th record? Have you tried doing filechecks on all the relevant files? What was the name of that program? bcheck? Do this when there are no users. Speaking of which.... I think I remember a case where SE got very upset when someone cleared the transaction log while there were still users on some of the tables doing work. You might have caused a bit of damage now or prior to your problem. Anyway, stop all users of the database. Clear the tranny log again if you like - probably a good idea actually. Run bcheck (?) on all the tables. Say 5 Hail Mary's.