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: Oracle Error 1002 in 8.1.7.3 on AIX 5

Re: Oracle Error 1002 in 8.1.7.3 on AIX 5

From: Anton Buijs <aammbuijs_at_xs4all.nl>
Date: Fri, 21 Jun 2002 00:07:07 +0200
Message-ID: <aetjk6$df$1@news1.xs4all.nl>


From the error book:
ORA-01002 fetch out of sequence
Cause: In a host language program, a FETCH call was issued out of sequence. A successful parse-and-execute call must be issued before a fetch. This can occur if an attempt was made to FETCH from an active set after all records have
been fetched. This may be caused by fetching from a SELECT FOR UPDATE cursor after a commit. A PL/SQL cursor loop implicitly does fetches and may also cause this error.
Action: Parse and execute a SQL statement before attempting to fetch the data.

Can't it just be the case that there is a bug in the Pro*C program that in certain data combinations a fetch is done when the last record is already fetched from the cursor? And that this data situation does not occur in development and did not occur in production before the upgrades? Mayby you can build into the program an "alter session set sql_trace=true" and then by looking into the trace file in the udump directory discover where it goes wrong. Adding messages in the program to follow the flow may help too.

An other option is that because of a bug fixed in the new version a certain situation now results in errors. It must be data related because it does not reproduce in development.

Russell Painter <rpainter_at_ppco.com> schreef in berichtnieuws 22c73286.0206181443.52b3390e_at_posting.google.com...
| Has anyone been getting ora 1002 "Fetch out of Sequence" after
| upgrading database to Oracle 8.1.7.3 on an AIX 5 platform? We just
| recently switched platforms (Sequent / Dynix to IBM / AIX 5) and
| upgraded our database (Oracle 8.0.5.2 to Oracle 8.1.7.3) and have been
| getting this ora 1002 error within some Pro * C code that was running
| fine before the conversion. Any ideas??? Oracle is giving us the run
| around because we can not create a sample program to send to them, nor
| can we re-produce in our development environment on a consistent
| basis. It consistently fails in our production environment (both
| development and production are the same exact setup). Any help would
| be appreciated! Please contact me at rpainter_at_ppco.com or
| paul.r.painter_at_accenture.com or post a reply. Thanks.
Received on Thu Jun 20 2002 - 17:07:07 CDT

Original text of this message

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