您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

[Oracle] SQL*Loader 详细使用教程

2024/2/27 15:29:45发布19次查看
输入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)
为了不用每次都在命令行中输入同样的参数,你也可以使用参数文件或把参数写在控制文件的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页精彩内容:
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product