輸入sqlldr,後面不接任何參數,將顯示所有的命令列參數的簡單描述及其預設值(當你忘記某些參數時,也可以通過這個方式快速查詢):
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 0)
load -- number of logical records to load (Default all)
errors -- number of errors to allow (Default 50)
rows -- number of rows in conventional path bind array or between direct path data saves
(Default: Conventional path 64, Direct path all)
bindsize -- size of conventional path bind array in bytes (Default 256000)
silent -- suppress messages during run (header,feedback,errors,discards,partitions)
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 1048576)
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 5000)
streamsize -- size of direct path stream buffer in bytes (Default 256000)
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 7200)
date_cache -- size (in entries) of date conversion cache (Default 1000)
no_index_errors -- abort load on any index errors (Default FALSE)
為了不用每次都在命令列中輸入同樣的參數,你也可以使用參數檔案或把參數寫在控制檔案的OPTIONS字句裡,當然命令列參數的優先順序最高,可以覆蓋參數檔案和控制檔案裡的參數配置。
SQL*Loader預設是匯入到本機資料庫,但也支援匯入到遠端資料庫,只要在username後面加上“@遠端資料庫連接字串”即可,如下所示:
> sqlldr CONTROL=ulcase1.ctl
Username: scott@inst1
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
接下來請看第2頁精彩內容:
| 【內容導航】 |
| 第1頁:命令列參數 |
第2頁:控制檔案 |