Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: PL/SQL Question

Re: PL/SQL Question

From: Thomas J. Kyte <tkyte_at_us.oracle.com>
Date: 2000/04/01
Message-ID: <8c4vft$gqj$1@nnrp1.deja.com>#1/1

In article <954586555.16542.0.pluto.d4ee154e_at_news.demon.nl>, "Sybrand Bakker" <postbus_at_sybrandb.demon.nl> wrote:
> A commit closes all cursors,
> Hence you cannot commit inside a cursor for loop.
> The only solution is to enlarge your rollback segments.
>

In general -- a commit does not close cursors. It will close a FOR UPDATE cursor since a commit releases all locks and a FOR UPDATE cursor is very much like an UPDATE.

see

http://x33.deja.com/threadmsg_md.xp?
thitnum=4&AN=605233970.1&mhitnum=1&CONTEXT=954597652.1557987332

> Hth,
> Sybrand Bakker, Oracle DBA
>
> <amerar_at_unsu.com> wrote in message news:8c4e1l$vl7$1_at_nnrp1.deja.com...
> >
> >
> >
> > Hi there,
> >
> > I have a cursor FOR loop that will update over 1 million records.
 The
 cursor
> > is defined with the FOR UPDATE clause. I have a counter that
 commits after
> > every 10000, however when running the program I got this error:
> >
> > ORA-01002: Fetch out of sequence
> >
> > What does this mean? Can't I commit within a cursor FOR loop?
> >
> > Thanks,
> >
> > Arthur
> > amerar_at_unsu.com
> >
> >
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
>
>

--
Thomas Kyte tkyte_at_us.oracle.com
Oracle Service Industries http://osi.oracle.com/~tkyte/index.html
--
Opinions are mine and do not necessarily reflect those of Oracle Corp


Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Sat Apr 01 2000 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US