on 04-22-2008 10:37 AM
Hi all,
I try under winows XP execute .bat file :
echo off
call "C:\Program Files\sdb\programs\bin\"Loadercli -d TEST -n 192.168.168.1 -u user,pass -b test.txt
pause
test.txt contains:
create table "table1"
(
"FIELD_ID" fixed(10,0),
"FIELD_2" varchar(200),
"FIELD_3" boolean default true,
primary key (FIELD_ID)
)
//
delete from "table1" where FIELD_ID<>0
and the result is:
create table "table1"
(
"FIELD_ID" fixed(10,0),
"FIELD_2" varchar(200),
"FIELD_3" boolean default true,
primary key (FIELD_ID)
)
Successfully executed
delete from "table1" where FIELD_ID<>0
Error during execution
-->-25010
SQL error 100 = Row not found (error position: 1)
Defined maximum number of errors (1) reached
Can anyone check this?
Why is that? In database studio code is 'clear' (Version: 7.7.03.18, MAXDB 7.6.03.07).
Statement 'create table "table1" ( "FIELD_ID" fixed(10,0), "FIELD_2" varchar(200), "FIELD_3" boolean default ...' successfully executed in 0 ms.
Statement 'delete from "table1" where FIELD_ID<>0' successfully executed in 0 ms. - Rows Affected: 0
Best regards,
Lukasz
Hi Lukasz,
looks like a typo in your textfile.
By using your example via copy&past I found the following:
-
C:\Dokumente und Einstellungen\Lars>loadercli -d db77 -u lars,lars -b c:\test.txt Loader protocol: 'C:\Dokumente und Einstellungen\Lars\Eigene Dateien\sdb\loader\log\loader.log' Loader packages: 'C:\Dokumente und Einstellungen\Lars\Eigene Dateien\sdb\loader\packages' User LARS connected to database DB77 schema LARS on local host. create table "table1" ( "FIELD_ID" fixed(10,0), "FIELD_2" varchar(200), "FIELD_3" boolean default true, primary key (FIELD_ID) ) Successfully executed delete from "table1" where FIELD_ID0 Error during execution -->-25010 SQL error -4005 = Unknown column name:FIELD_ID0 (error position: 28[line: 1, col: 28]) Defined maximum number of errors (1) reached 1 error(s) while processing command file 'c:\test.txt'. ---> See Loader log file for more information.
-
Obviously FIELD_ID0 is just not there...
If I change the skript I get the following:
-
create table "table1" ( "FIELD_ID" fixed(10,0), "FIELD_2" varchar(200), "FIELD_3" boolean default true, primary key (FIELD_ID) ) Successfully executed delete from "table1" where FIELD_ID Error during execution -->-25010 SQL error -8006 = Data types must be compatible (error position: 28[line: 1, col: 28])
-
Only when I change the skript once more it works as expected and described in the documentation:
-
User LARS connected to database DB77 schema LARS on local host. create table "table1" ( "FIELD_ID" fixed(10,0), "FIELD_2" varchar(200), "FIELD_3" boolean default true, primary key (FIELD_ID) ) Successfully executed delete from "table1" where FIELD_ID=0 Error during execution -->-25010 SQL error 100 = Row not found (error position: 1) Defined maximum number of errors (1) reached
-
The [documentation for loadercli in command mode|http://maxdb.sap.com/doc/7_6/95/9a5b4177e07f47e10000000a1550b0/content.htm] says:
"The Loader establishes a connection to the database instance DEMOB for the user MONA. The Loader processes the commands and statements contained in the command file command.dat.
If errors occur (return code <> 0) in doing this, the processing of the command file is terminated as soon as 20 error messages have appeared."
Return code 100 (row not found) is the SQL standard return code. You may also see it in the dbmserver protocol files from time to time.
SQL Studio, sqlcli or DB Studio are just so "nice" to say: Ok, it's not really an error if no data is selected.
But these tools are designed for interactive use.
Loadercli on the opposite is made for batch loading jobs. If there some data is not found (as it was expected) than this is something noteworthy.
You may ignore the error by using the -E option to specify a number of errors to be ignored.
Hope that helps,
Lars
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.