Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / January 2006

Tip: Looking for answers? Try searching our database.

SQL Error "SQL3040N" when execute DB2import under DB2 version 7.2

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
szechi@gmail.com - 25 Jan 2006 10:22 GMT
Greetings,
  I am facing the following error when trying to use DB2 import
command under DB2 version 7.2.

SQL3040N  Unable to use the lobpath/lobfile parameters as specified.
Reason code: "1"

My db2 command is as followed:

DB2 CONNECT TO TESTDB USER db2admin USING db2admin
DB2 IMPORT FROM "D:\TestData\import.out" OF DEL LOBS FROM "D:\TestData"
MODIFIED BY COLDEL"|" DATEFORMAT=\"DD/MM/YYYY\" LOBSINFILE METHOD P
(1,2,3,4,5,6,7) messages "D:\TestData\import.msg" INSERT INTO
TEST.TABLEQ ( QGNGID, QGNID, QVERSEQ, QPAGE, QIMG, QDATE, QTIME )
DB2 COMMIT WORK
DB2 CONNECT RESET

This is the content of my "import.out" file:

1|33547|1|1|996962FBS|18/01/2006|22:45
1|33548|1|1|996962FRU|18/01/2006|22:45
1|33549|1|1|996963RBS|18/01/2006|22:45

and my image files ( "996962FBS", "996962FRU", "996963RBS") are located
under "D:\TestData".

I have been using the same way to import data under DB2 version 8.2
and there is no such error. What would be the correct DB2import syntax
to use for version 7.2? Your quick feedback is very much appreciated.
Knut Stolze - 25 Jan 2006 11:35 GMT
> Greetings,
>    I am facing the following error when trying to use DB2 import
> command under DB2 version 7.2.
>
> SQL3040N  Unable to use the lobpath/lobfile parameters as specified.
> Reason code: "1"

Read the explanation of the error message and act accordingly:

$ db2 "? sql3040"

The last part of the explanation for reason code 1 is something you ignored.

Signature

Knut Stolze
DB2 Information Integration Development
IBM Germany

szechi@gmail.com - 26 Jan 2006 03:04 GMT
Hi,
 Thanks for your prompt reply. Finally I managed to solve this problem
and noticed the following differences in DB2 "import" syntax between
version 7 and version 8.

In DB2 version 7:
1) There is no double quote (") between the path specified.
2) There must be a slash (\) after you specify the LOB path.
3) There are two double quotes("") for DATAFORMAT

For example:
 Import script in Version 8:

DB2 IMPORT FROM "D:\TestData\import.out" OF DEL LOBS FROM "D:\TestData"

MODIFIED BY COLDEL"|" DATEFORMAT=\"DD/MM/YYYY\" LOBSINFILE METHOD P
(1,2,3,4,5,6,7) messages "D:\TestData\import.msg" INSERT INTO
TEST.TABLEQ ( QGNGID, QGNID, QVERSEQ, QPAGE, QIMG, QDATE, QTIME )

 and the workable script in version 7 should be:

DB2 IMPORT FROM D:\TestData\import.out OF DEL LOBS FROM D:\TestData\
MODIFIED BY COLDEL"|" DATEFORMAT="\"DD/MM/YYYY\"" LOBSINFILE METHOD P
(1,2,3,4,5,6,7) messages D:\TestData\import.msg INSERT INTO
TEST.TABLEQ ( QGNGID, QGNID, QVERSEQ, QPAGE, QIMG, QDATE, QTIME )

Best regards,
   TAN

> > Greetings,
> >    I am facing the following error when trying to use DB2 import
[quoted text clipped - 13 lines]
> DB2 Information Integration Development
> IBM Germany
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.