Re: WHAT IS ORA-6571

From: Registro Unico Automotor <rua_at_wara.bolnet.bo>
Date: 1996/07/22
Message-ID: <31F45982.142E_at_wara.bolnet.bo>#1/1


andreas_at_orca.fhcrc.org wrote:
>
> > Bob Yeh <yehr_at_itsi.disa.mil> writes:
> > Hi,
> >
> > I got the following message when execute a function in the SQL*PLUS.
> > The function gets the next sequence number from a sequence.
> >
> >
> > ERROR at line 1:
> > ORA-06571: Function GETSEQUENCE does not guarantee not to update database.
> >
> > Can soneone tell me what this is.
> > The message book does not have ORA-6571 to ORA-5680.
> >
> > Please E-mail me if possible.
> >
> > Thanks. Bob
> >
> >>>>
> this happened to me when i had a lock in my function, but not with a procedure
> I believe you need a function that calls a procedure to get around it....
 

>>>>>>>>>>>>>>>>It also happened to me when I tried to execute a stored procedure
from SQL*Plus.

The explanation is not on the manual for version 7.1 but for version 7.2 and says that there are two possible causes for that message:

  1. An SQL statement references a packaged PL/SQL function that does not contain a pragma trat prevents the database from being updated, and
  2. A SQL statement references a stand-alone, PL/SQL function that contains an instruction to update the database.

The function should be recreated with the required pragma. Include 'Write No Database State' (WNDS) argument in the argument list of the pragma.

In the second case, don't use that function.

I hope that can help you...

Marcelo Villegas
rua_at_wara.bolnet.bo Received on Mon Jul 22 1996 - 00:00:00 CEST

Original text of this message