Re: snapshot too old

From: Brian Graham <GrahamB_at_psac.com>
Date: 23 Mar 1995 13:23:30 GMT
Message-ID: <3krsoi$dda_at_nic.ott.hookup.net>


In article <3kq6hc$ar4_at_hettar.cv.com>, dano_at_bluedevil.cv.COM (Dan Weinman) says:
>
>I have a pro*c program that is used to update selected records in a large table.
>After processing about 400,000 records the program aborts with the
>ORA-01555 error. The program declares a cursor for the select statement
>and then fetches 500 rows at a time using the cursor. It then has the
>possibility of updating any or all of the rows depending on the values of
>the columns selected. A commit is done after the update and another 500
>rows is fetched. This will continue until the error occurs.
>
>I know that the rollback segments hold the read consistent view of the data
>being used by the cursor and the updated data for rollback purposes. The
>database has four rollback segments configured.
>
>Is the problem not enough rollback segments? I did not see any new extents
>allocated when watching the rollback activity with monitor.
>
>Any information on this would be appreciated.
>
>Thanks in advance.
>
>Dan
>

  SNAPSHOT TOO OLD occurs when somebody else has updated the row after you selected it. Rather than just selecting the rows, try reserving the rows for update. That way if you need to update the row you can.

                                        Brian

--
Brian Graham                    .
Programmer / DBA        ._______|_______. Tel: 613-560-5470
Public Service Alliance       \(*)/       Fax: 613-563-3492
of Canada                     o/ \o       Email: grahamb_at_psac.com
Received on Thu Mar 23 1995 - 14:23:30 CET

Original text of this message