Results 1 to 6 of 6
  1. #1
    Join Date
    Oct 2002
    Location
    Brazil
    Posts
    5

    Unanswered: 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.

  2. #2
    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

  3. #3
    Join Date
    Oct 2002
    Location
    Brazil
    Posts
    5
    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?

  4. #4
    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 13:17.

  5. #5
    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

  6. #6
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •