sqlldr工具
SQL*Loader的用戶端工具是sqlldr,在作業系統的命令列下輸入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)
另外兩種配置命令列參數的方法
如果每次都必須在sqlldr中輸入參數,一定煩不勝煩,因此Oracle提供了兩種方式用來儲存通用的 參數,方便重用。
第一種方法是使用參數檔案,把通用的參數寫在參數檔案中,然後在sqlldr中用parfile指定該參數 檔案。
第二種方法是把通用參數寫在控制檔案的OPTIONS字句中,並在sqlldr中用control指定控制檔案。
我通常採用第二種方法,因為這樣可以省了參數檔案,比較方便。
那如果上面三個地方都配置了同一個參數,誰的優先順序大呢?sqlldr命令列 > 參數檔案 > 控制檔案。