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

Home -> Community -> Usenet -> c.d.o.misc -> Re: ORA-06571 error..

Re: ORA-06571 error..

From: Lío <jgonzalezs_at_nospam.es>
Date: 1998/09/15
Message-ID: <35fee304.6615441@news.mad.ibernet.es>#1/1

I've had the same problem about one month ago. It seems to be that, when you call a packaged function from an sql statement, Oracle is not sure that the function will not make changes in the database, because packaged functions are precompiled. So you get the ORA-06571.

I supose that you may have something like this in your procedure: SELECT MONEY_TO_CHAR (column_name) FROM table_name WHERE ...

In order to avoid this, you must notice oracle that the function MONEY_TO_CHAR will not update the database. You must add inside of the package specification, after the MONEY_TO_CHAR function declaration, the pragma or pseudoinstruction:

CREATE PACKAGE pkg_name AS
  PROCEDURE p1(....);

  FUNCTION MONEY_TO_CHAR(....) RETURN CHAR;   PRAGMA RESTRICT REFERENCES (MONEY_TO_CHAR, 'WNDS');  PROCEDURE p2(...);
.......
END pkg_name;  

WARNING! I'm not sure that this sintax is exactly right. I'll check it tomorrow and , if not, re-post the correct sintax.

Aside from WNDS (Write No Database State) exists RNDS (Read No ...) and two more distinct parameters (I don't remember the values) for this pragma that you can add to the pseudoinstruction: PRAGMA RESTRICT REFERENCES MONEY_TO_CHAR ('RNDS', 'WNDS'); But I ignore its utility.

El 11 Sep 1998 14:15:33 GMT, "Danil Krasnov" <danil_at_maginfo.net> escribio:

>I try to run PL/SQL procedure.
>And get an error message:
>
>"ORA-06571: Function MONEY_TO_CHAR does not guarantee not to update
>database"

--
Saludos!
Lío.
(Para correo o réplicas, cambiar nospam por nexo, asi:)
jgonzalezsuare_at_nexo.es
Received on Tue Sep 15 1998 - 00:00:00 CDT

Original text of this message

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