1、创建控制文件
options(direct=true)
Load data
infile ‘/var/log/xferlog.tmplog‘
into table ta_ftp_log
append
fields terminated by ‘|‘
trailing nullcols
(
LOGID integer external,
invoketime DATE ‘yyyymmdd hh24:mi:ss‘,
interfacename char,
interfacetype char,
invokesysname char,
transfertime integer external,
transfertyep char,
specialflag char,
transferto char,
model char,
username char,
status char,
filename char
)
2、使用sqlldr命令
sqlldr jiang/jiang@10.137.17.129/ora11g control=/var/log/ta_ftp_log.ctl log=/var/log/ta_ftp_log.log errors=2000(注释:errors每次生成的错误行数)