If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > Error on inserting

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-07-03, 06:09
computologo computologo is offline
Registered User
 
Join Date: Oct 2002
Location: Brazil
Posts: 5
Error on inserting

Hi. I'm developing a java application on Informix and occasionally I get the folowing error:

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

I found some informations saying that this error occurs with lock problems. My application is already in dirty read, and this error appears when I insert a new row at a table. Why this error occasionally appears on insertion? I'm having a lock problem or a connection problem (multiple clients accessing serializable transactional records in a database). Thanks.
Reply With Quote
  #2 (permalink)  
Old 01-07-03, 06:11
Roelwe Roelwe is offline
Registered User
 
Join Date: Aug 2002
Location: Belgium
Posts: 534
It is possible your table has page locking instead of row locking. When you want to insert into a page that is locked...

Check with select * from systables what locking mode you have T or R.

With the alter table statement you can set the mode to row locking.
__________________
rws
Reply With Quote
  #3 (permalink)  
Old 01-07-03, 10:57
computologo computologo is offline
Registered User
 
Join Date: Oct 2002
Location: Brazil
Posts: 5
Quote:
Originally posted by Roelwe
It is possible your table has page locking instead of row locking. When you want to insert into a page that is locked...

Check with select * from systables what locking mode you have T or R.

With the alter table statement you can set the mode to row locking.
No, it is locklevel row.... another ideas?
Reply With Quote
  #4 (permalink)  
Old 01-07-03, 12:06
Bob Elliot Bob Elliot is offline
Registered User
 
Join Date: Jan 2003
Posts: 6
Its on the read not the insert

If you look at the error message it is "Could not do a physical-order read to fetch next row"

If you get a lock error on Insert this is "Could not insert new row into the table."

It looks as though the set isolation to dirty read is not being applied before you do a read.

I am not familiar with accessing Informix From Java.

From ESQL/C (SQL embedded in C) the Set Isolation applies to a database connection.
It stays the same until it is changed.

Is the isolation not being set to dirty read - or is the connection being re-established in some way ?

Also in ESQL/C there is a structure which gives further information - sqlca. Īs this accessible to Java or are you simply given a thrown Exception ?

The ISAM/Code (found in sqlerrd[1] tells you excatly what is causing the error (lock or corrupt database)).

The full text of your error is
-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 file might have
been corrupted. Unless the ISAM error code or an operating-system
message points to another cause, run the bcheck or secheck utility to
verify file integrity.

Though in my experience it is always a lock.

Last edited by Bob Elliot; 01-07-03 at 12:17.
Reply With Quote
  #5 (permalink)  
Old 01-08-03, 01:37
ladwig ladwig is offline
Registered User
 
Join Date: May 2002
Location: Osnabrueck Germany
Posts: 59
Hi,
do you try to insert a row with unique key? Could it be possible that this key already is in the table?
__________________
Juergen Ladwig
Reply With Quote
  #6 (permalink)  
Old 01-08-03, 05:49
Ramesh Ramesh is offline
Registered User
 
Join Date: Aug 2002
Location: INDIA
Posts: 24
I too got the similar problem once after a large number of rows were inserted into the table. I ran 'Update statistics' and the problem did not occur. Just try it out.

Ramesh
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On