快速从oracle导出大数据

每次导入数据用oracle自带的sqlldr

sqlldr

C:\>sqlldr


SQL*Loader: Release 9.2.0.1.0 - Production on 星期一 5月 7 15:30:22 2012


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 p
ath data saves
(默认: 常规路径 64, 所有直接路径)
  bindsize -- Size of conventional path bind array in bytes(默认256000)
    silent -- Suppress messages during run (header,feedback,errors,discards,part
itions)
    direct -- use direct path                    (默认FALSE)
   parfile -- parameter file: name of file that contains parameter specification
s
  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 unus
able(默认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: 命令行参数可以由位置或关键字指定
。前者的例子是 'sqlload
scott/tiger foo'; 后一种情况的一个示例是 'sqlldr control=foo
userid=scott/tiger'.位置指定参数的时间必须早于
但不可迟于由关键字指定的参数。例如,
允许 'sqlldr scott/tiger control=foo logfile=log', 但是
不允许 'sqlldr scott/tiger control=foo log', 即使
参数 'log' 的位置正确。

在cmd下输入

>sqlldr userid=smssend/zlz197919@OAZX_119 control=data.ctl log=log.log


data.ctl文件内容

options (skip=0,rows=128)
load data
INFILE "d:\ctl\kk.csv"
badfile "d:\ctl\kk.bad"
discardfile "d:\ctl\kk.dsc"
truncate INTO table kk
FIELds terminated by ','optionally enclosed by '"'
trailing nullcols
(
 USERNUMBER  terminated by ',', 
 PRODCTID    terminated by ',', 
 D_TIME      terminated by ',',
 D_KTFS   terminated by whitespace
)

速度那是很快滴。


需要从oracle中导出数据,如果用sqlplus pool很慢而且数据不是规整的,所以我在网上转,遇到这个第三方工具sqluldr2这个是基于命令行下的还有一个是图形界面的

SQLULDR2W.exe,截个图

可以在www.anysql.net下载到,而且网站还有很多工具。




  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值