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: ORA-01001: invalid cursor ORA-06512

Re: ORA-01001: invalid cursor ORA-06512

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Sat, 17 Jun 2006 00:15:15 +0200
Message-ID: <n2b692hcn57p0ala0p4qacl40ebdg9jni2@4ax.com>


On 16 Jun 2006 13:49:43 -0700, "BrianK" <byankeyster_at_gmail.com> wrote:

>I am using ODP.net and randomly receive the following error:
>
>ORA-01001: invalid cursor ORA-06512
>
>when trying to execute a stored procedure with this structure:
>
>CREATE OR REPLACE PROCEDURE ...
>AS
> BEGIN
>update ...
>where ....
>
>update ...
>where ....
>and
>(
>exists (select .... WHERE ....)
>or ....
>);
>END;
>
>After it happens the first time the the error repeats itself until I
>restart the oracle service. Version 10.2
>
>I am new to oracle and dont even understand why there is a cursor error
>when I am not even using cursors.
>
>Any ideas?
>
>Thanks

You are probably not posting the complete error message. ORA-6512 is a generic error which is always accompanied by another error message. To obtain the full error, run the procedure through sql*plus, isql*plus or toad.

ORA-1001 (did you look up the error message at http://tahiti.oracle.com ? Please always do!) occurs when you fetch from a cursor that hasn't been opened.

Cursors comes in two flavors: explicit and implicit. A select into is an implicit cursor.
Updates and inserts are implicit cursors. So yes you are using cursors.
As you don't post the entire procedure, and crystall balls have been long sold out here, it is not possible to give you anymore assistance, other than to direct you at the pl/sql reference manual at http://tahiti.oracle.com where you can read all about cursors.

--
Sybrand Bakker, Senior Oracle DBA
Received on Fri Jun 16 2006 - 17:15:15 CDT

Original text of this message

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