charset参数 sqluldr2_linux下配置 oracle数据导出工具sqluldr2
標簽:
一、下載工具:
打開http://www.anysql.net/在其右邊找到sqluldr2,然后點擊:
二、下載后解壓,有各種對應的版本,我們選擇linux64位的:
三、將其放到你要執行的linux目錄下,修改 $HOME 目錄下.bash_profile 增加如下環境變量:
export LD_LIBRARY_PATH=$ORACLE_HOME/bin:$ORACLE_HOME/lib:/lib:/usr/lib
再用?./sqluldr2_linux64_10204.bin 加上對應的參數執行就可以了。
先執行./sqluldr2_linux64_10204.bin可以看到其參數說明:
[oracle@localhost ~]$ ./sqluldr2_linux64_10204.bin
SQL*UnLoader: Fast Oracle Text Unloader (GZIP, Parallel), Release 4.0.1
(@) Copyright Lou Fangxin (AnySQL.net) 2004 - 2010, all rights reserved.
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
下面舉一下例子:
1、
./sqluldr2_linux64_10204.bin user=c##scott/scott@orcl query="select * from emp" file="emp.txt"
2、
./sqluldr2_linux64_10204.bin user=c##scott/scott alter="DISABLE PARALLEL QUERY;" sql=sql/n3.sql charset=AL32UTF8 record=0x0d0x0a file=emp.csv
3、
./sqluldr2_linux64_10204.bin parfile=parfiles/scott query="select * from emp" file=/home/yaokangjun/emp.txt
其中parfile=parfiles/scott為其當前目錄parfiles配置文件scott,如scott為:
user=c##scott/scott@orcl
charset=ZHS16GBK
field=0X1F
record=0x0d0x0a
alter=set nls_date_format=‘yyyymmddhh24miss‘;
標簽:
總結
以上是生活随笔為你收集整理的charset参数 sqluldr2_linux下配置 oracle数据导出工具sqluldr2的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: LOAM_velodyne学习(三)
- 下一篇: python函数-基础知识