Re: Help:Snapshot too old

From: Andrew Simkovsky <asimkovsky_at_email.msn.com>
Date: Fri, 13 Apr 2001 16:47:42 -0400
Message-ID: <#JX7qnFxAHA.298_at_cpmsnbbsa09>


[Quoted] Create a huge rollback segment. Then before each iteration of the loop, put [Quoted] in this statement:

SET TRANSACTION USE ROLLBACK SEGMENT rb_name;

<u518615722_at_spawnkill.ip-mobilphone.net> wrote in message news:l.987126659.1116729736_at_dialup-63.214.204.229.philadelphia1.level3.net.. .
> Our PL/SQL is very simple
>
> Declare
> Cursor A is
> select * from table B;
>
> Begin
>
> For C in A loop
> v_counter=v_counter+1;
> insert into table D values ....
> if mod(v_counter,2000)=0 then
> commit;
> end if;
> end loop;
> end;
>
> But we always get error message says
> snapshot too old. I even tried commit
> every 5 rows, I still have the same problem.
> If we try to commit every 20,000 rows, we
> will have problem until 800,000 rows was
> inserted.
>
> Any suggestions?
>
> Thanks
>
>
>
>
>
> --
> Sent by dbadba62 from hotmail in area com
> This is a spam protected message. Please answer with reference header.
> Posted via http://www.usenet-replayer.com/cgi/content/new
Received on Fri Apr 13 2001 - 22:47:42 CEST

Original text of this message