charset参数 sqluldr2_SQL*Loader 的使用sqlldr和sqluldr2方法详解
oracle數據導出工具sqluldr2可以將數據以csv、txt等格式導出,適用于大批量數據的導出,導出速度非???。
導出后可以使用oracle loader工具將數據導入。
簡介:
Sqluldr2:專業用于大數據量導出工具之一,效率比普通導出快70%。
Sqlldr:?? 專業用于導入的工具之一, 在使用時,最好用磁盤寫入速度快,網絡好,網速快的做。
導出數據:
sqluldr2 user=c##scott/tiger@192.168.1.250/orcl field=0x03 sql=lead_table.sql file=lead_table.dat charset=ZHS16GBK head=no safe=yes fast=yes serial=ture
[oracle@master2 test]$ more lead_table.sql
select CASEID,STEPID,ACTIONDATE from LEAD_TABLE;
生成文件
[oracle@master2 test]$ sqluldr2 user=c##scott/tiger@192.168.1.250/orcl field=0x03 sql=lead_table.sql file=lead_table.dat charset=ZHS16GBK head=no safe=yes fast=yes serial=ture
0 rows exported at 2019-01-23 11:15:10, size 0 MB.
10 rows exported at 2019-01-23 11:15:10, size 0 MB.
output file lead_table.dat closed at 10 rows, size 0 MB.
導入數據:
[oracle@master2 test]$ sqlldr userid=c##scott/tiger@192.168.1.250/orcl data=lead_table.dat control=lead_table.ctl log=lead_table.log skip=0 rows=10000 direct=true streamsize=30720000 date_cache=30720000SQL*Loader: Release 12.1.0.2.0 - Production on Wed Jan 23 11:50:18 2019Copyright (c)1982, 2014, Oracle and/or its affiliates. Allrights reserved.
Path used: DirectLoad completed - logical record count 1.TableLEAD_TABLE:1Row successfully loaded.Check the log file:
lead_table.log
for more information about the load.[oracle@master2 test]$ echo $?0
控制文件:
[oracle@master2 test]$ more lead_table.ctlLOADDATA
CHARACTERSET'ZHS16GBK'INFILE*
INTO TABLELEAD_TABLE
FIELDS TERMINATEDBY X'03' optionally enclosed by '"'trailing nullcols
(
CASEID,
STEPID,
ACTIONDATE "to_timestamp(:ACTIONDATE,'YYYY-MM-DD-HH24:MI:SS.FF')"
)
總結
以上是生活随笔為你收集整理的charset参数 sqluldr2_SQL*Loader 的使用sqlldr和sqluldr2方法详解的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 常见三种字符编码的区别:ASCII、Un
- 下一篇: 一个传值的问题”*”与”*”