Re: Help! failed to extend rollback segment error.

From: james.mumper <jimm_at_cbnews.cb.att.com>
Date: 1995/11/14
Message-ID: <DI1n1H.2pn_at_nntpa.cb.att.com>#1/1


In article <488bi3$eeq_at_srvr1.engin.umich.edu>, Ed Steinman <esteinma_at_umich.edu> wrote:
>I'm sure I've had problems in the past with cursors and commits. But now
>that I know others have had luck with this I will be more demanding of
>making such code work when I next need it. Thanks.
>------------------------------------------------------------------
>Ed Steinman What the Zen Buddhist said to the

The problem is when you open a cursor in the begin section of a PL/SQL block. For example

cursor rows is

        select rowid from emp;

my_row rowid;

begin

open rows; /* This is the bad statement and will be closed by the first

           /* commit that is runs into. Don't do this. Instead,

for i in emp loop;

do whatever with something;

commit;

end loop;

end;

This will allow you to commit within the loop and not impact your cursor. The key being to allow PL/SQL to open the cursor implicitly rather than explicitly.

Jim Received on Tue Nov 14 1995 - 00:00:00 CET

Original text of this message