-
Zugriff vom SQlRPGLE AUF DB2 Linux
Hallo zusammen ,
hat jemand erfahrung wie man von einem SQLRPGLE auf eine DB2(linux) zugreift.
WrkRDBDIRE eintrag vorhanden .
SQLPACKAGE auch auf beiden System vorhanden .
SQl Connect funktioniert auch nur ich bekomme keine Daten .
Hab mal 2 Wege aufprobiert .
Beim SQl: Select Count(*) into :Counter from Libaa.filebb
erhalte ich folgende Fehlermeldung
Message ID . . . . . . : SQL0727 Severity . . . . . . . : 30
Message . . . . : Evaluation of global variable *N in *N failed.
Cause . . . . . : An error occurred during evaluation of the DEFAULT clause
of global variable *N in *N. The SQLCODE associated with the failure is
204. The SQLSTATE is 42704. The message tokens are LIBaa.Filebb.
This failure may also indicate an error occurred on a system other than
DB2 for IBM i during implicit system action 5.
Recovery . . . : Refer to the joblog or see the product documentation for
more information regarding the detected error. Correct the error and try
the request again.
Bei
String1 = 'Select Max(PK) from Database.Libaa.FileBB';
Exec SQL Prepare DynCsrC1 From :String1;
erhalte ich folgendes
Message ID . . . . . . : SQL0204 Severity . . . . . . . : 30
Message type . . . . . : Diagnostic
Date sent . . . . . . : 08.07.15 Time sent . . . . . . : 10:46:25
Message . . . . : filebb in Libaa type *N not found.
Cause . . . . . : Filebb in Libaa type *N was not found. If the member
name is *ALL, the table is not partitioned. If this is an ALTER TABLE
statement and the type is *N, a constraint or partition was not found. If
this is not an ALTER TABLE statement and the type is *N, a function,
procedure, trigger or sequence object was not found.
If a function was not found, Fileaa is the service program that
contains the function. The function will not be found unless the external
name and usage name match exactly. Examine the job log for a message that
gives more details on which function name is being searched for and the name
that did not match.
Recovery . . . : Change the name and try the request again. If the object
Per STRSQl funktioniert es .
Gruss
-
Problem selber gelöst
-
Und wie?
Ich schätze, dass das einige interessieren würde.
Birgitta
-
ich habe alles nochmal neu aufgesetzt .
CRTSQLRPGI wandeln mit bestimmten parameter
Sqlpackage lokal und auf dem Remote erstellt und es funzt . Commit Steuerung eingestellt (*none) geht gar nicht und die lokalen tabellen müssen journalisiert sein .
Oder was meinst du mit wie ?
das einzige wo ich jetzt gerade hänge ist der direkte Insert im Programm .
Insert into lokale.lib.file +
Select * from remotedb.lib.file where ....
das mag er nicht ;( .
-
... in einem SQL Statement kann man nur in abgezählten Ausnahmen 2 unterschiedliche Datenbanken ansprechen (insert into lokal select ... from Server.schema.Tabelle sollte mit neuerem Release gehen) ansonsten kann man mit set Connection zwischen den Connections pendeln.
D*B
-
@bender,
nur wie ??
per STRSQL funzt das aber im SQLRPGLE
funzt das nicht
Insert into lokale.lib.file +
Select * from remotedb.lib.file where ....
nur warum ?
fehlermeldung :
Message ID . . . . . . : SQL0727 Severity . . . . . . . : 30
Message type . . . . . : Diagnostic
Date sent . . . . . . : 08.07.15 Time sent . . . . . . : 16:12:41
Message . . . . : Evaluation of global variable *N in *N failed.
Cause . . . . . : An error occurred during evaluation of the DEFAULT clause
of global variable *N in *N. The SQLCODE associated with the failure is
204. The SQLSTATE is 42704. The message tokens are
das pendeln das du meinst ist doch sätze einzeln verarbeiten.
fetch
connection wechseln , update fahren , connection wechseln nächster fetch....
-
... einzeln verarbeitet wird das sowieso.
Mit three part alias muss die aktuelle Connection local sein und dann
Insert into lib.file +
Select * from remotedb.lib.file where...
-
ach du scheisse bin ich ......
Aber vielen Dank . Manchmal steht man nicht nur im Wald .....
-
jetzt erhalte ich folgende fehlermeldung wenn ich den commit absetze :
"Insert into lib.file +
Select * from remotedb.lib.file where..."
xxx rows inserted in xx in aa.
GET DIAGNOSTICS statement complete.
DRDA resource does not allow SQL cursor hold.
Message ID . . . . . . : CPD835D Severity . . . . . . . : 20
Message type . . . . . : Diagnostic
Date sent . . . . . . : 09.07.15 Time sent . . . . . . : 08:54:19
Message . . . . : DRDA resource does not allow SQL cursor hold.
Cause . . . . . : A commit or rollback operation, with SQLHOLD(YES)
specified, was performed for commitment definition *DFTACTGRP. However, the
relational database xxx at remote location *N, or IP address
::ffff:172.21.13.15, does not allow cursor hold. If the remote location is
*ARDPGM, the relational database is located by using an application
requester driver program.
Recovery . . . : Retry the commit or rollback operation using SQLHOLD(NO).
Technical description . . . . . . . . : The commitment definition identifier
is X'5CC4C6E3C1C3E3C7D9D7'. The activation group number is X'00000002'.
weiss da jemand rat?
-
... steht doch schon drin, commit hold geht nicht mit der remote DB.
D*B
-
ich muss aber mit commit arbeiten weil commit * none die remote DB nicht zulässt .
-
Similar Threads
-
By Toschie in forum IBM i Hauptforum
Antworten: 12
Letzter Beitrag: 02-02-15, 14:28
-
By ExAzubi in forum NEWSboard Programmierung
Antworten: 10
Letzter Beitrag: 10-11-14, 10:12
-
By Peet in forum NEWSboard Programmierung
Antworten: 9
Letzter Beitrag: 29-10-14, 07:54
-
By Tonazzo in forum NEWSboard Programmierung
Antworten: 5
Letzter Beitrag: 16-06-14, 09:30
-
By B.Hauser in forum IBM i Hauptforum
Antworten: 4
Letzter Beitrag: 01-10-01, 17:31
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