Oracle数据库导入文本数据

==migrate.par==
userid=xxdb/[email protected]/xxdb


==go.bat==
sqlldr rows=1000 readsize=4000000 bindsize=4000000 control=public.ceb_app_versions.ctl log=public.ceb_app_versions.log parfile=migrate.par


==public.ceb_app_versions.ctl==
LOAD DATA
INFILE        'public.ceb_app_version.gbk'
BADFILE       'ceb_app_versions.bad'
DISCARDFILE   'ceb_app_versions.dsc'
INSERT TNTO TABLE ceb_app_versions
FIELDS TERMINATED BY '|' OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS
(
id    CHAR  NULLIF(id = blanks),
version_no CHAR  NULLIF(version_no = blanks),
os_name CHAR NULLIF(os_name = blanks),
update_url CHAR  NULLIF(update_url = blanks),
is_force_update CHAR NULLIF(is_force_update = blanks)
mark  CHAR NULLIF(mark = blanks)
)

==public.ceb_app_versions.gbk==
1|1.1.0|iphone|https://itunes.apple.com/cn/app/yao-yao-jiao-fei/id672111230?mt=8|1|
















时间类型/大文本


==ctl控制文件==
LOAD DATA
INFILE        'public.ceb_orders.gbk'
BADFILE       'ceb_orders.bad'
DISCARDFILE   'ceb_orders.dsc'
INSERT TNTO TABLE ceb_orders
FIELDS TERMINATED BY '|' OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS
(
id    CHAR  NULLIF(id = blanks),
start_time    TIMESTAMP "YYYY-MM-DD HH24:MI:SS.FF"  NULLIF(start_time = blanks),
end_time    TIMESTAMP "YYYY-MM-DD HH24:MI:SS.FF"  NULLIF(end_time = blanks),
content CHAR(4000)  NULLIF(content = blanks)
)
==数据文件==
1990|2013-12-05 15:12:55|2014-12-05 15:12:55|tigertigertigertigertigertigertiger...

你可能感兴趣的:(oracle)