Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Sqluldr2 usage

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Corresponding to 32 and 64-bit win and Linux platforms, respectively

Installation steps

1. Oracle_client needs to be installed

two。 Copy sqluldr2_linux32_10204.bin (sqluldr2_linux64_10204.bin for 64-bit systems) to the bin directory of $ORACLE_HOME and rename it to sqluldr2.bin

3. Modify the .bash _ profile in the $HOME directory and add the following environment variables

Export LD_LIBRARY_PATH=$ORACLE_HOME/bin:$ORACLE_HOME/lib:/lib:/usr/lib4. Verification

-bash-3.2 $sqluldr2.bin

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

Usage under LINUX:

Get_tables.sql exports sql for predefined

-bash-3.2 $sqluldr2.bin USER=userid/keyword@db_name sql=get_tables.sql head=no FILE=/oracle/oradata/backup/stock.csv

0 rows exported at 2014-05-06 11:49:25, size 0 MB.

1000000 rows exported at 2014-05-06 11:49:28, size 24 MB.

2000000 rows exported at 2014-05-06 11:49:32, size 48 MB.

3000000 rows exported at 2014-05-06 11:49:35, size 76 MB.

4000000 rows exported at 2014-05-06 11:49:38, size 2014 MB.

Rows exported at 2014-05-06 11:49:41, size 5000000 MB.

6000000 rows exported at 2014-05-06 11:49:44, size 2014 MB.

7000000 rows exported at 2014-05-06 11:49:47, size 176MB.

Rows exported at 2014-05-06 11:49:50, size 8000000 MB.

9000000 rows exported at 2014-05-06 11:49:53, size 228 MB.

10000000 rows exported at 2014-05-06 11:49:56, size 252 MB.

11000000 rows exported at 2014-05-06 11:49:59, size 280 MB.

12000000 rows exported at 2014-05-06 11:50:02, size 304MB.

13000000 rows exported at 2014-05-06 11:50:05, size 328 MB.

14000000 rows exported at 2014-05-06 11:50:08, size 356 MB.

15000000 rows exported at 2014-05-06 11:50:11, size 380 MB.

16000000 rows exported at 2014-05-06 11:50:14, size 408 MB.

17000000 rows exported at 2014-05-06 11:50:17, size 432 MB.

18000000 rows exported at 2014-05-06 11:50:20, size 456MB.

19000000 rows exported at 2014-05-06 11:50:23, size 484MB.

20000000 rows exported at 2014-05-06 11:50:27, size 508 MB.

21000000 rows exported at 2014-05-06 11:50:30, size 531 MB.

21877116 rows exported at 2014-05-06 11:50:33, size 558 MB.

Output file / oracle/oradata/backup/f_stock.csv closed at 21877116 rows, size 558 MB.

-bash-3.2 $

The following is how to use the WINDOWS platform:

Code example 1:

Sqluldr2.exe USER= user / password @ tnsQUERY= "select / * + parallel (8) * / * from cs_XXX dt,cfg_XXX devdim105 wheredt.starttime > = to_date ('2012-06-27 00 purse 00mm hh34:mi:ss') and dt.starttime

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report