输入sqlldr后面不接任何参数将显示所有的命令行参数的简单描述及其默认值(当你忘记某些参数时也可以通过这个方式快速查询)
[plain]
Valid Keywords:
userid ORACLE username/password
control control file name
log log file name
bad bad file name
data data file name
discard discard file name
discardmax number of discards to allow (Default all)
skip number of logical records to skip (Default )
load number of logical records to load (Default all)
errors number of errors to allow (Default )
rows number of rows in conventional path bind array or between direct path data saves
(Default: Conventional path Direct path all)
bindsize size of conventional path bind array in bytes (Default )
silent suppress messages during run (headerfeedbackerrorsdiscardspartitions)
direct use direct path (Default FALSE)
parfile parameter file: name of file that contains parameter specifications
parallel do parallel load (Default FALSE)
file file to allocate extents from
skip_unusable_indexes disallow/allow unusable indexes or index partitions (Default FALSE)
skip_index_maintenance do not maintain indexes mark affected indexes as unusable (Default FALSE)
commit_discontinued commit loaded rows when load is discontinued (Default FALSE)
readsize size of read buffer (Default )
external_table use external table for load; NOT_USED GENERATE_ONLY EXECUTE (Default NOT_USED)
columnarrayrows number of rows for direct path column array (Default )
streamsize size of direct path stream buffer in bytes (Default )
multithreading use multithreading in direct path
resumable enable or disable resumable for current session (Default FALSE)
resumable_name text string to help identify resumable statement
resumable_timeout wait time (in seconds) for RESUMABLE (Default )
date_cache size (in entries) of date conversion cache (Default )
no_index_errors abort load on any index errors (Default FALSE)
为了不用每次都在命令行中输入同样的参数你也可以使用参数文件或把参数写在控制文件的OPTIONS字句里当然命令行参数的优先级最高可以覆盖参数文件和控制文件里的参数配置
SQL*Loader默认是导入到本地数据库但也支持导入到远程数据库只要在username后面加上@远程数据库连接字符串即可如下所示
> sqlldr CONTROL=ulcasectl
Username: scott@inst
Password: password
下面是命令行参数的具体解释
BAD 坏文件名 (bad)
CONTROL 控制文件名 (ctl)
DATA 数据文件名(dat)等同于控制文件里的INFILE可以指定多个数据文件
DIRECT true表示使用直接路径加载false表示使用传统路径加载
DISCARD 丢失文件名(dsc)
DISCARDMAC 最多允许多少条记录可以被丢失如果超过该数字将停止加载
ERRORS 最多预习多少条记录insert失败如果超过该数字将停止加载
EXTERNAL_TABLE 是否使用外部表加载方式
FILE 该参数只在直接路径并行加载时有用
LOAD 最多允许多少条记录可以被加载
LOG 日志文件名(log)
PARALLEL true or false直接路径加载是否使用并行模式
PARFILE 参数文件名(par)
ROWS 指定达到多少条记录时提交
SKIP 指定忽略最开始的多少条记录
SKIP_INDEX_MAINTENANCE true表示在直接路径加载过程中不维护索引导致索引状态变为unusable