I have a source table and destination table in different databases
Both tables have the same column structure.
Some of the columns are of type CLOB.
I am using db2 export command to export the data of the source table into .dat file. The delimiter is ‘|’
And then using import command to import the data from .dat file into destination table.
import from $TEMP_DIR/TO_IMPORT.dat of del modified by KEEPBLANKS dateformat=\"YYYY-MM-DD\" timeformat=\"HH:MM:SS\" timestampformat=\"YYYY-MM-DD HH:MM:SS.UUU\" chardel0x01 coldel| COMMITCOUNT 1000 messages $LOG_DIR/to_import.log insert into MY_SCHEMA.MY_TABLE
However, during import I am getting errors on CLOB columns.
How to deal with CLOB columns during import. Or, if change in export is needed, what is the change?
Thanks for reading!
It would have been easier if you had specified what exact error you are getting.
Typically if your LOB is greater than 32K you need to export it in a separate file and use that file along with your base file during import. You will have to use the
LOBS FROM /Location/Fileand modifierLOBSINFILEwhile export.