六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 72|回复: 0

DB2 Import / Export

[复制链接]

升级  60.33%

117

主题

117

主题

117

主题

举人

Rank: 3Rank: 3

积分
381
 楼主| 发表于 2013-1-13 18:36:35 | 显示全部楼层 |阅读模式
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 del  select * 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 del  insert into names
import from names.del of del  replace into names

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

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

Modifying a delimiter
  export ...... modified by chardel *
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表