Sqluldr2/Sqlldr
1. Sqluldr2 export text
Sqluldr2 is a flexible and powerful Oracle text export program, the main parameters are as follows:
- 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
Use sqluldr2 help=yes
to view more parameter descriptions.
e.g
sqluldr2 data/data@orcl
query="select * from sx_table"
parfile=d:\exp.par
file=d:\sx_table.txt
The content of exp.par is as follows:
head=yes
batch=yes
safe=yes
rows=3000000
record=0x0d0x0a
A control file named "sx_table_sqlldr.ctl" will be generated in the current directory, through which SQL*Loader can be used to load data into the sx_table table.
2. Sqlldr import text
Sqlldr (SQL*Loader) is used by Oralce to load text files into the database.
sqlldr userid=test/test@orcl
readsize=33554432
streamsize=33554432
date_cache=10000000
direct=true
skip_index_maintenance=true
skip_unusable_indexes=true
multithreading=true
errors=10000000
skip=1
log="d:\load.log"
control="d:\sx_table_sqlldr.ctl"
data="d:\sx_table.txt"