Oracle数据快速导出⼯具:sqluldr2
sqluldr2
Sqluldr2是⼀款可以快速导出oracle数据库中的数据的⼩⼯具。
Oracle在PL/SQL Developer下,导出⽂件较慢,尤其在⾯对海量数据下载时,⼀款能够提速50%-75%数据下载速度的⼯具显得尤为重要。Sqluldr2是不错的选择。
下载链接:Sqluldr2。
解压资源
在windows下,只需要在该地址下打开命令⾏窗⼝,直接执⾏对应的⽂件即可。
具体的数据格式和命令:
Usage: SQLULDR2 keyword=value [,keyword=value,...]
Valid Keywords:
user = username/password@tnsname
sql = SQL file name
query = select statement
field = separator string between fields
record = separator string between records
rows = print progress for every given rows (default, 1000000)
file = output file name(default: )
log = log file name, prefix with + to append mode
fast = auto tuning the session level parameters(YES)
text = output type (MYSQL, CSV, MYSQLINS, ORACLEINS, FORM, SEARCH).
charset = character set name of the target database.
ncharset= national character set name of the target database.
parfile = read command option from parameter file
read = set DB_FILE_MULTIBLOCK_READ_COUNT at session level
sort = set SORT_AREA_SIZE at session level (UNIT:MB)
hash = set HASH_AREA_SIZE at session level (UNIT:MB)
array = array fetch size
head = print row header(Yes|No)
batch = save to new file for every rows batch (Yes/No)
size = maximum output file piece size (UNIB:MB)
serial = set _serial_direct_read to TRUE at session level
trace = set event 10046 to given level at session level
table = table name in the sqlldr control file
control = sqlldr control file and path.
mode = sqlldr option, INSERT or APPEND or REPLACE or TRUNCATE
buffer = sqlldr READSIZE and BINDSIZE, default 16 (MB)
long = maximum long field size
width = customized max column width (w1:w2:...)
quote = optional quote string
data = disable real data unload (NO, OFF)
alter = alter session SQLs to be execute before unload
safe = use large buffer to avoid ORA-24345 error (Yes|No)
crypt = encrypted user information only (Yes|No)
sedf/t = enable character translation function
null = replace null with given value
escape = escape character for special characters
escf/t = escape from/to characters list
format = MYSQL: MySQL Insert SQLs, SQL: Insert SQLs.
exec = the command to execute the SQLs.
prehead = column name prefix for head line.
rowpre = row prefix string for each line.
rowsuf = row sufix string for each line.
colsep = separator string between column name and value.
presql = SQL or scripts to be executed before data unload.
postsql = SQL or scripts to be executed after data unload.
lob = extract lob values to single file (FILE).
lobdir = subdirectory count to store lob files .
split = table name for automatically parallelization.
degree = parallelize data copy degree (2-128).
for field and record, you can use '0x' to specify hex character code,
\r=0x0d \n=0x0a |=0x7c ,=0x2c, \t=0x09, :=0x3a, #=0x23, "=0x22 '=0x27
oracle数据导出⼯具sqluldr2
基本简介
  下载完sqluldr解压后,⽂件夹内容如下:
oracle选择数据库
  ⽤于32位windows平台;
  sqluldr2_linux32_10204.bin 适⽤于linux32位操作系统;
  sqluldr2_linux64_10204.bin 适⽤于linux64位操作系统;
  ⽤于64位windows平台。
使⽤⽅法
  1、⾸先将复制到执⾏⽬录下,即可开始使⽤
  2、查看help 帮助
sqluldr2 官⽅下载
  3、执⾏数据导出命令
  3.1、常规导出
  sqluldr2 test/test@127.0.1.1/orcl query=”select * from temp_001” head=yes file=d:\tmp001.csv
  说明:head=yes 表⽰输出表头
  3.2、使⽤sql参数
  sqluldr2 test/test@127.0.1.1/orcl sql=test_sql.sql head=yes file=d:\tmp001.csv
  test_sql的内容为:
  select * from temp_001
  3.3、使⽤log参数
  当集成sqluldr2在脚本中时,就希望屏蔽上不输出这些信息,但⼜希望这些信息能保留,这时可以⽤“LOG”选项来指定⽇志⽂件名。  sqluldr2 test/test@127.0.1.1/orcl sql=test_sql.sql head=yes file=d:\tmp001.csv log=+d:\tmp001.log
  3.4、使⽤ table 参数
  当使⽤ table 参数时,在⽬录下会⽣成对应的ctl控制⽂件,如下语句会⽣成temp_l⽂件。
  sqluldr2 test/test@127.0.1.1/orcl query=”select * from temp_001” table=temp_001 head=yes file=d:\tmp001.csv

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。