sqlldr工具

 

SQL*Loader的客户端工具是sqlldr,在操作系统的命令行下输入sqlldr,后面不接任何参数,将显示帮助信息如下所示(所有命令行参数的简单描述及其默认值),所以你并不需要对下面的参数死记硬背,当你忘记它们时,可以通过这个方式快速查询。

  1. Valid Keywords:
  2. userid -- ORACLE username/password
  3. control -- control file name
  4. log -- log file name
  5. bad -- bad file name
  6. data -- data file name
  7. discard -- discard file name
  8. discardmax -- number of discards to allow          (Default all)
  9. skip -- number of logical records to skip    (Default 0)
  10. load -- number of logical records to load    (Default all)
  11. errors -- number of errors to allow            (Default 50)
  12. rows -- number of rows in conventional path bind array or between direct path data saves
  13. (Default: Conventional path 64, Direct path all)
  14. bindsize -- size of conventional path bind array in bytes  (Default 256000)
  15. silent -- suppress messages during run (header,feedback,errors,discards,partitions)
  16. direct -- use direct path                      (Default FALSE)
  17. parfile -- parameter file: name of file that contains parameter specifications
  18. parallel -- do parallel load                     (Default FALSE)
  19. file -- file to allocate extents from
  20. skip_unusable_indexes -- disallow/allow unusable indexes or index partitions  (Default FALSE)
  21. skip_index_maintenance -- do not maintain indexes, mark affected indexes as unusable  (Default FALSE)
  22. commit_discontinued -- commit loaded rows when load is discontinued  (Default FALSE)
  23. readsize -- size of read buffer                  (Default 1048576)
  24. external_table -- use external table for load; NOT_USED, GENERATE_ONLY, EXECUTE  (Default NOT_USED)
  25. columnarrayrows -- number of rows for direct path column array  (Default 5000)
  26. streamsize -- size of direct path stream buffer in bytes  (Default 256000)
  27. multithreading -- use multithreading in direct path
  28. resumable -- enable or disable resumable for current session  (Default FALSE)
  29. resumable_name -- text string to help identify resumable statement
  30. resumable_timeout -- wait time (in seconds) for RESUMABLE  (Default 7200)
  31. date_cache -- size (in entries) of date conversion cache  (Default 1000)
  32. no_index_errors -- abort load on any index errors  (Default FALSE)

另外两种配置命令行参数的方法

 

如果每次都必须在sqlldr中输入参数,一定烦不胜烦,因此Oracle提供了两种方式用来存储通用的参数,方便重用。

第一种方法是使用参数文件,把通用的参数写在参数文件中,然后在sqlldr中用parfile指定该参数文件。

第二种方法是把通用参数写在控制文件的OPTIONS字句中,并在sqlldr中用control指定控制文件。

我通常采用第二种方法,因为这样可以省了参数文件,比较方便。

那如果上面三个地方都配置了同一个参数,谁的优先级大呢?sqlldr命令行 > 参数文件 > 控制文件。

导入数据到远程数据库

 

SQL*Loader默认是导入到本地数据库,但也支持导入到远程数据库,只要在username后面“@远程数据库连接字符串”即可,如下所示:

> sqlldr CONTROL=ulcase1.ctl
Username: scott@inst1
Password: password

命令行参数详细说明

1. 指定文件名:control, bad, log, data, discard, parfile

2. 传统路径加载:direct=false(默认);直接路径加载:direct=true

3. 最大允许错误的记录数:errors;最大允许丢弃的记录数:discardmax;最大允许加载的记录数:load

4. 只有在直接路径加载下才能用的参数:no_index_errors(默认为false,如果为true表示在加载过程中不会把index设为unusable);parallel(默认为false,如果为true表示启用并行加载);skip_index_maintenance(默认为false,如果为true表示在加载过程中停止索引的维护)

5. rows:表示达到多少行将提交,默认(传统路径加载64,直接路径加载all)

6. skip:省略最前面的记录数

 
 

[Oracle] SQL*Loader 详细使用教程(4)- 字段列表

[Oracle] SQL*Loader 详细使用教程(2)- 命令行参数的更多相关文章

  1. [Oracle] SQL*Loader 详细使用教程(3)- 控制文件

    控制文件是SQL*Loader里最重要的文件,它是一个文本文件,用来定义数据文件的位置.数据的格式.以及配置数据加载过程的行为,在sqlldr中以control参数指定控制文件.   在控制文件里配置 ...

  2. [Oracle] SQL*Loader 详细使用教程(1)- 总览

    SQL*Loader原理   SQL*Loader是Oracle提供的用于数据加载的一种工具,它比较适合业务分析类型数据库(数据仓库),能处理多种格式的平面文件,批量数据装载比传统的数据插入效率更高. ...

  3. [Oracle] SQL*Loader 详细使用教程(4)- 字段列表

    在上一篇中我们介绍了SQL*Loader中最重要的文件——控制文件,而本篇要介绍控制文件中最重要的部分——字段列表,字段列表的作用是把数据文件中的记录和数据库中表的列对应起来,下面是字段列表的一个例子 ...

  4. [Oracle] SQL*Loader 详细使用教程(5)- 典型例子

    本文介绍SQL*Loader在实际使用过程中经常用到的典型例子. 1. 表中的列比数据文件的列要少怎么办? 假设一个csv的文件如下: a1,a2,a3,a4 b1,b2,b3,b4 c1,c2,c3 ...

  5. VS2013中带命令行参数的调试方法---C++

    今天先记录一下(也是传说中大神喜欢装逼的comment line)c++中向主函数int main(int argc,char** argv )传递4中方法,欢迎添加新方法, 然后可以参考别人写的很好 ...

  6. [Oracle] Data Pump 详细使用教程(5)- 命令交互模式

    [Oracle] Data Pump 详细使用教程(1)- 总览 [Oracle] Data Pump 详细使用教程(2)- 总览 [Oracle] Data Pump 详细使用教程(3)- 总览 [ ...

  7. [Oracle] Data Pump 详细使用教程(4)- network_link

    [Oracle] Data Pump 详细使用教程(1)- 总览 [Oracle] Data Pump 详细使用教程(2)- 总览 [Oracle] Data Pump 详细使用教程(3)- 总览 [ ...

  8. Oracle SQL Loader

    C:/Documents and Settings/WWJD>sqlldr SQL :: Copyright (c) , , Oracle. All rights reserved. 用法: S ...

  9. oracle sql*loader的使用

    用法: SQLLDR keyword=value [,keyword=value,...] 有效的关键字:     userid -- ORACLE 用户名/口令    control -- 控制文件 ...

随机推荐

  1. LoadRunner11.00安装问题及解决方法

    1.安装提示:“安装程序已确定正在等待重新启动....” 解决方法:打开安装包,找到:\Additional Components\IDE Add-Ins\MS Visual Studio .NET\ ...

  2. Masonry学习分享

    不完整目录 •UIScrollView 应用Masonry的正确用法 •tableHeaderView使用Masonry •同向文字显示优先级 1.基础篇 1.1基础使用 1.1.1运行效果 1.1. ...

  3. [转]javascript 快速隐藏/显示万行表格列的方法

    原文地址:javascript 快速隐藏/显示万行表格列的方法 隐藏表格列,最常见的是如下方式: td.style.display = "none"; 这种方式的效率极低.例如,隐 ...

  4. Object[]arr代码输出奇怪字符的解释

    代码:class  lizi  { public static void main(String[] args){ //TODO  Auto-generated method stub Object[ ...

  5. C#中的特性基本理解

    定制特性可以应用的目标元素可以为:程序集(assembly).模块(module).类型(type).属性(property).事件(event).字段(field).方法(method).参数(pa ...

  6. ASP.NET Page执行顺序【转】

    一.ASP.NET 母版页和内容页中的事件 母版页和内容页都可以包含控件的事件处理程序.对于控件而言,事件是在本地处理的,即内容页中的控件在内容页中引发事件,母版页中的控件在母版页中引发事件.控件事件 ...

  7. RDIFramework.NET ━ 9.16 案例模块━ Web部分

    RDIFramework.NET ━ .NET快速信息化系统开发框架 9.15  案例模块 -Web部分 9.16.1.产品管理模块 产品管理模块提供了基本的增.删.改.查.导出.分页等的实现,用户可 ...

  8. Struts2(一):怎么创建对应版本的struts.xml

    1.eclisep导航菜单:windows->preferences->Xml->Xml Catalog; 2.在Xml Catalog右侧,添加一个新的XML Catalog: 3 ...

  9. paper 107:图像的白平衡

    所谓白平衡(White Balance):指在图像处理的过程中,对原本材质为白色的物体的图像进行色彩还原,去除外部光源色温的影响,使其在照片上也显示白色.也就是不管在任何光源下,都能将白色物体还原为白 ...

  10. TCMalloc的使用

    Windows下: 1. 编译libtcmalloc_minimal,编成静态的动态的都可以. 2. 在链接中设置附加依赖库libtcmalloc_minimal.lib,并且强制符号引用要加上__t ...