CTOCIO IT专家网

天极传媒 比特网 | 天极网 | IT专家网 | IT商网 | 52PK游戏网 | 手机天极 | IT分众 |
IT专家网搜索

数据库 | Oracle | DB2 | SQL Server | MySQL | 商业智能 | BI | DBA | Sybase| SQL Server 2008

您现在的位置: IT专家网 > 数据库子站

学习Oracle SQL loader 的使用

作者: ,  出处:CSDN, 责任编辑: 武扬, 
2005-04-28 16:15
  oracle自己带了很多的工具可以用来进行数据的迁移、备份和恢复等工作。但是每个工具都有自己的特点。

  一:sql loader 的特点

  oracle自己带了很多的工具可以用来进行数据的迁移、备份和恢复等工作。但是每个工具都有自己的特点。比如说exp和imp可以对数据库中的数据进行导出和导出的工作,是一种很好的数据库备份和恢复的工具,因此主要用在数据库的热备份和恢复方面。有着速度快,使用简单,快捷的优点;同时也有一些缺点,比如在不同版本数据库之间的导出、导入的过程之中,总会出现这样或者那样的问题,这个也许是oracle公司自己产品的兼容性的问题吧。

  sql loader 工具却没有这方面的问题,它可以把一些以文本格式存放的数据顺利的导入到oracle数据库中,是一种在不同数据库之间进行数据迁移的非常方便而且通用的工具。缺点就速度比较慢,另外对blob等类型的数据就有点麻烦了。

  二:sql loader 的帮助

  C:\>sqlldr

  SQL*Loader: Release 9.2.0.1.0 - Production on 星期六 10月 9 14:48:12 2004

  Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.


  用法: SQLLDR keyword=value [,keyword=value,...]

  有效的关键字:

  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        (全部默认)
  skip -- Number of logical records to skip  (默认0)
  load -- Number of logical records to load  (全部默认)
  errors -- Number of errors to allow          (默认50)
  rows -- Number of rows in conventional path bind array or between direct path data saves
  (默认: 常规路径 64, 所有直接路径)
  bindsize -- Size of conventional path bind array in bytes(默认256000)
  silent -- Suppress messages during run (header,feedback,errors,discards,partitions)
  direct -- use direct path                    (默认FALSE)
  parfile -- parameter file: name of file that contains parameter specifications
  parallel -- do parallel load                   (默认FALSE)
  file -- File to allocate extents from
  skip_unusable_indexes -- disallow/allow unusable indexes or index partitions(默认FALSE)
  skip_index_maintenance -- do not maintain indexes, mark affected indexes as unusable(默认FALSE)
  readsize -- Size of Read buffer                (默认1048576)
  external_table -- use external table for load; NOT_USED, GENERATE_ONLY, EXECUTE(默认NOT_USED)
  columnarrayrows -- Number of rows for direct path column array(默认5000)
  streamsize -- Size of direct path stream buffer in bytes(默认256000)
  multithreading -- use multithreading in direct path
  resumable -- enable or disable resumable for current session(默认FALSE)
  resumable_name -- text string to help identify resumable statement
  resumable_timeout -- wait time (in seconds) for RESUMABLE(默认7200)
  date_cache -- size (in entries) of date conversion cache(默认1000)

  PLEASE NOTE: 命令行参数可以由位置或关键字指定。前者的例子是 'sqlloadscott/tiger foo'; 后一种情况的一个示例是 'sqlldr

  control=foouserid=scott/tiger'.位置指定参数的时间必须早于但不可迟于由关键字指定的参数。例如,允许 'sqlldr scott/tiger

  control=foo logfile=log', 但是不允许 'sqlldr scott/tiger control=foo log', 即使参数 'log' 的位置正确。

  C:\>

共2页。 1 2 :

网友评论

笔名 
请您注意:遵守国家有关法律、法规,尊重网上道德,承担一切因您的行为而直接或间接引起的法律责任。    IT专家网友拥有管理笔名和留言的一切权利。
  • 周排行榜
  • 月排行榜

邮件订阅


    

该文章的读者还阅读了

天极服务 | 关于我们 | 网站律师 | 加入我们 | 联系我们 | 广告业务 | 友情链接 | 我要挑错
All Rights Reserved, Copyright 2004-2008, Ctocio.com.cn
渝ICP证B2-20030003号 如有意见请与我们联系 powered by 天极内容管理平台CMS4i