Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: ORA-01001: invalid cursor ORA-06512
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 DBAReceived on Fri Jun 16 2006 - 17:15:15 CDT