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.

 
Go Back  dBforums > Database Server Software > DB2 > Extract DDL from IXF file

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-28-06, 17:28
bwmoore22 bwmoore22 is offline
Registered User
 
Join Date: Nov 2006
Posts: 1
Extract DDL from IXF file

I need to import/load an IXF file, but the table contains a column that is too long to be logged, which causes IMPORT to fail with

"SQL3319N An SQL error "-355" occurred while creating the table"

and I don't have the DDL for the target tablel, so I can't use the LOAD utility. Is there any way to extract the DDL from an IXF file?

I've unsuccessfully tried the following approach suggested by another post from a couple of years ago.

-------------------
db2 "IMPORT FROM myfile.ixf OF IXF ROWCOUNT 1 CREATE INTO B" >> /dev/null
db2look -d LISDEV -t B -e
db2 "DROP TABLE B" >> /dev/null
------------------

Any suggestions?

DB2 V8.2 FixPak 10 on Windows 2003
Reply With Quote
  #2 (permalink)  
Old 11-28-06, 22:45
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
I am not sure if this will work, but you might try using the ROWCOUNT 1 option on the IMPORT to only import the first row. If the first row LOB data is not too large for logging, then you may be OK.

edit: Sorry, I did not see that you already tried to import only the first row.

You might try a where clause to import some other row other than the first row to find one with a LOB less than 1GB. However, I thought that if you do not have your LOBs in a separate file (outside the IXF), then the data will be truncated at 32K.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390

Last edited by Marcus_A; 11-28-06 at 22:50.
Reply With Quote
  #3 (permalink)  
Old 11-29-06, 02:28
guyprzytula guyprzytula is offline
Registered User
 
Join Date: Jun 2006
Posts: 471
ixf

it is not easy, but the ddl can be extracted
see infocenter and search for pc/ixf record types
this describes the records for an ixf file and check also in same chapter pc/ixf data types
a simple editor could help to display the records and recreate the ddl if really needed.
sample : C009ATTEST_ID NNY02R496
c=record type-- 9 column name length -- ATTEST_ID column name -- N null - 02 position in primary key - 496 data type=integer........
Hope this will help
__________________
Best Regards, Guy Przytula
DB2 UDB LUW certified V6/7/8

Last edited by guyprzytula; 11-29-06 at 02:52.
Reply With Quote
  #4 (permalink)  
Old 12-11-08, 02:18
arnne arnne is offline
Registered User
 
Join Date: Dec 2008
Posts: 1
Thanks Marcus A it your suggestion helped me a lot...
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On