| |
|
If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
|
 |

02-26-08, 05:43
|
|
Registered User
|
|
Join Date: Feb 2008
Posts: 25
|
|
|
db2 load client from....
|
|
Hi!
I'm trying to use the command
Code:
db2 load client from D:/Uni/Diplomarbeit/workspace/dbi-root/scriptsDB2/Createa-dbX.sql of sql
insert into test.a
So, i try to load the file Createa-dbX.sql from the client to the db2 relation test.a.
I'm connected with the programm DBVisualizer, and tried there the sql-query.
But it doesn't work, and i get the error message:
Code:
[Error Code: -219, SQL State: 42704] DB2 SQL error: SQLCODE: -219, SQLSTATE: 42704, SQLERRMC: LANGWIED.EXPLAIN_INSTANCE
I'm a real newbie in DB2; perhaps my command is wrong. I really don't know...
Hope, someone has some idea!
Martin
|
|

02-26-08, 07:14
|
|
Registered User
|
|
Join Date: Jun 2006
Posts: 471
|
|
the load command should be used to load data and not execute sql
of sql... is not a valid type either it should be ixf, del, asc, cursor
command window can be sued to execute sql
db2 -tvf infilename
sql -219 means the explain tables are not created
see online info center for detailed message
__________________
Best Regards, Guy Przytula
DB2 UDB LUW certified V6/7/8
|
|

02-26-08, 07:30
|
|
Registered User
|
|
Join Date: Feb 2008
Posts: 25
|
|
|
|
Hi!
I think the ending sql of the file was missleading. At the end, there are just INSERT-Commands stored, e.g.:
Code:
INSERT INTO test.a VALUES (408, 108, 50, 750, '957');
INSERT INTO test.a VALUES (720, 96, 30, 250, '66');
INSERT INTO test.a VALUES (768, 60, 60, 500, '726');
(these insert commands do work, if i try them manually).
Changing the file types of the load command from sql to asc, del, ixf doesn't work either.
I also tried to change the "/" in the classpath to "\", but i still get an error message..
SQL-Command:
Code:
db2 load client from D:/Uni/Diplomarbeit/workspace/dbi-root/scriptsDB2/Createa-dbX.txt of asc
insert into test.a
Error-MEssage:
Code:
[Error Code: -104, SQL State: 42601] DB2 SQL error: SQLCODE: -104, SQLSTATE: 42601, SQLERRMC: db2 load client from D:/;BEGIN-OF-STATEMENT;<values>
Regards,
Martin
|
|

02-26-08, 07:42
|
|
Registered User
|
|
Join Date: Jun 2006
Posts: 471
|
|
if windows why don't you use d:\xx\
what is the format of the input file, just changing the command at random is not what you want, it should be accordingly the input data
use del if delimited file ixf if ixf format
see info center for all details..
__________________
Best Regards, Guy Przytula
DB2 UDB LUW certified V6/7/8
|
|

02-26-08, 08:08
|
|
Registered User
|
|
Join Date: Feb 2008
Posts: 25
|
|
Okay, i changed the slashes to backslashes;
To the input file. It is an ordinary textfile with some INSERT-Statements, as described in my last message:
Code:
INSERT INTO test.a VALUES (408, 108, 50, 750, '957');
INSERT INTO test.a VALUES (720, 96, 30, 250, '66');
INSERT INTO test.a VALUES (768, 60, 60, 500, '726');
Now, i get a new error messae:
Code:
[Error Code: -7, SQL State: 42601] DB2 SQL error: SQLCODE: -7, SQLSTATE: 42601, SQLERRMC: \;load client from D:
Regards,
Martin
|
|

02-26-08, 09:46
|
|
Registered User
|
|
Join Date: Jun 2006
Posts: 471
|
|
this is an sql file, no need for the load command
just execute it with db2 -tvf filename
this is all
__________________
Best Regards, Guy Przytula
DB2 UDB LUW certified V6/7/8
|
|

02-27-08, 04:02
|
|
Registered User
|
|
Join Date: Feb 2008
Posts: 25
|
|
Thanks a lot for the help!
I got it working!
Martin
|
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|