473,395 Members | 1,680 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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

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.

Jan 25 '06 #1
2 4011
sz****@gmail.com wrote:
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.

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Jan 25 '06 #2
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

Knut Stolze wrote:
sz****@gmail.com wrote:
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.

--
Knut Stolze
DB2 Information Integration Development
IBM Germany


Jan 26 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Janne Ruuttunen | last post by:
Hello DB2 people, I'm having problems exporting >= 250000 lobs to IXF files with the LOBSINFILE option, using a legacy DB2 2.1 system on Win NT. If I don't specify a path for the lobs,...
2
by: db2dbdba | last post by:
Hi All, I am working in DB2 and trying to export data from a table. DDL for my table is CREATE TABLE "CMMETA "."CMREF" ( "SITECODE" SMALLINT , "CMPNTKEY" CHAR(32) , ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.