Press "Enter" to skip to content

sqluldr2安装

主机环境:Redhat 6
下载地址:http://www.onexsoft.com/zh/download
安装步骤:
64位安装包为:mysqluldr2linux64.zip
解压:unzip mysqluldr2linux64.zip,解压后为mysqluldr2_linux64.bin
将mysqluldr2_linux64.bin移到$ORACLE_HOME/bin目录下即可。
常见参数如下:
/sqluldr2linux64.bin --help

SQL*UnLoader: Fast Oracle Text Unloader (GZIP, Parallel), Release 4.0.1
(@) Copyright Lou Fangxin (AnySQL.net) 2004 - 2010, all rights reserved.

License: Free for non-commercial useage, else 100 USD per server.

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: uldrdata.txt)
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

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

常见几个例子:
根据查询语句导出:sqluldr2linux64.bin user=test/test@orcl query="select * from testdb" file="test.txt"
如果查询sql比较长,则可以把sql语句放入到文件中:sqluldr2linux64.bin user="username/pwd" sql="/home/query.sql" field="0x09" record=0x0a file="/home/table.txt" charset=UTF8

Be First to Comment

发表评论

电子邮件地址不会被公开。 必填项已用*标注