luzl 发表于 2013-1-13 18:36:35

DB2 Import / Export

There are three utilities for bulk load/unload:    Export, Import, Load
Supported file types:
    DEL - delimited ASCII format - this is what you mostly use.
    ASC - for import (1 line => 1 row, column selection based on byte position in the line).
    IXF - Integrated Exchange Format (contains table def. and data) - you will probably never use it.
    WSF - Work Sheet Format - used with some old spreadsheets.

EXPORT:
export to names.del of delselect * from names
IMPORT:
insert - add (append) rows of data
insert_update - add rows (or update existing data)
replace - deletes all data from the table - then inserts new data
replace_create - (only with IXF files) - deletes / re-creates the table and fill it with data
import from names.del of delinsert into names
import from names.del of delreplace into names

Here is how to truncate a table:
   import from /dev/null of delreplace into mytab

LOAD:
Load utility is faster, than import utility, but import utility is logged and is checking constraints
load from names.del of delreplace into names

Modifying a delimiter
export ...... modified by chardel *
页: [1]
查看完整版本: DB2 Import / Export