-
Ggf. liegt es an dem Attribut "[NOT] DETERMNINISTIC" !
DETERMINISTIC or NOT DETERMINISTIC Specifies whether the procedure returns the same results each time the procedure is called with the same IN and INOUT arguments.
NOT DETERMINISTIC The procedure may not return the same result each time the procedure is called with the same IN and INOUT arguments, even when the referenced data in the database has not changed.
DETERMINISTIC The procedure always returns the same results each time the procedure is called with the same IN and INOUT arguments, provided the referenced data in the database has not changed.
-
Hallo,
ich würde eher FENCED bzw. NOT FENCED vorschlagen. Dieses Schlüssel-Wort ist bereits V5R2 sowohl beim CREATE PROCEURE als auch beim CREATE FUNCTION verfügbar:
FENCED or NOT FENCED
Specifies whether the external function runs in an environment that is isolated from the database manager environment. FENCED is the default.
FENCED
The function will run in a separate thread.
FENCED functions cannot keep SQL cursors open across individual calls to the function. However, the cursors in one thread are independent of the cursors in any other threads which reduces the possibility of cursor name conflicts.
NOT FENCED
The function may run in the same thread as the invoking SQL statement.
NOT FENCED functions can keep SQL cursors open across individual calls to the function. Since cursors can be kept open, the cursor position will also be preserved between calls to the function. However, cursor names may conflict since the UDF is now running in the same thread as the invoking SQL statement and other NOT FENCED UDFs.
NOT FENCED functions usually perform better than FENCED functions.
Bei DETERMINISTIC werden die Ausgabe-Werte (Parameter- und Result Sets) zwischen gespeichert. Beim nächsten Aufruf mit den gleichen Parametern, wird die Prozedur nicht ausgeführt, sondern lediglich das zuvor gesicherte Ergebnis ausgegeben.
Birgitta
-
Genau das DETERMINISTIC scheint ja das falsche Ergebnis zu bringen.
Ausserdem sollten verschiedene Threads nicht die selbe Connection sharen, das führt immer zu Problemen.
-
Vielen Dank für die schnellen Antworten, ich habe mal beide Schlüsselwörter ('NOT DETERMINISTIC, u. 'FENCED') integriert, wobei ich mit 'NOT DETERMINISTIC' schon auch rumprobiert hatte. 'FENCE' hatte ich allerdings noch nicht ausprobiert.
Auf jeden Fall schaut jetzt mein Procedure-Kopf folgendermaßen aus (siehe unten). Jetzt warte ich mal, wann dieser Fehler wieder auftritt...
Evtl. ist bei höheren Versionsständen (wir haben V5R2) dieses Phänomen beseitigt!?
-----------------------------------------
create procedure vogtj/SPTUNNEL(
IN actionname char(20)
)
result sets 1
language sql
NOT DETERMINISTIC
FENCED
Similar Threads
-
By PeterKarsten in forum IBM i Hauptforum
Antworten: 9
Letzter Beitrag: 10-11-06, 09:40
-
By florian in forum IBM i Hauptforum
Antworten: 10
Letzter Beitrag: 17-05-06, 16:08
-
By us400 in forum NEWSboard Java
Antworten: 6
Letzter Beitrag: 21-01-06, 09:46
-
By Atomik in forum IBM i Hauptforum
Antworten: 7
Letzter Beitrag: 15-02-05, 13:53
-
By KB in forum IBM i Hauptforum
Antworten: 3
Letzter Beitrag: 18-04-01, 15:30
Berechtigungen
- Neue Themen erstellen: Nein
- Themen beantworten: Nein
- You may not post attachments
- You may not edit your posts
-
Foren-Regeln
|
Erweiterte Foren Suche
Google Foren Suche
Forum & Artikel Update eMail
AS/400 / IBM i
Server Expert Gruppen
Unternehmens IT
|
Kategorien online Artikel
- Big Data, Analytics, BI, MIS
- Cloud, Social Media, Devices
- DMS, Archivierung, Druck
- ERP + Add-ons, Business Software
- Hochverfügbarkeit
- Human Resources, Personal
- IBM Announcements
- IT-Karikaturen
- Leitartikel
- Load`n`go
- Messen, Veranstaltungen
- NEWSolutions Dossiers
- Programmierung
- Security
- Software Development + Change Mgmt.
- Solutions & Provider
- Speicher – Storage
- Strategische Berichte
- Systemmanagement
- Tools, Hot-Tips
Auf dem Laufenden bleiben
|
Bookmarks