oracle匯出大數量資料到檔案sqluldr2
在oracle中,當要匯出表的資料時,由於資料量巨大,匯出的工作顯得有點困難,現提供有如下幾種方式:
1、imp/exp工具,匯出來的是dmp檔案,如果想要excel或txt就顯得有點難;
2、PLSQL Developer開發工具,它也能實現匯入資料,而且可以匯出不同的格式,但是在匯出資料的行數會存在一定的問題,一般在70-80萬行還算正常,上百萬的時候就可能有問題;
3、用spool,這是一種好方法;在使用時可以選擇不將結是顯示在螢幕,這就是同時要加上set term off,而且將語句放入SQL檔案,以@run.sql方式執行;
4、網上的一個工具ociuldr,但它只匯出為txt檔案,這個工具速度超快。
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
E:\music\ociuldr>sqluldr2 user=music/iwie_0925bmc@dbserver query="select t.mbno
from t_sp_inbox t where t.intime>to_date('20100401', 'yyyymmdd') and (t.msg lik
e 'VV1%' or t.msg like 'VV2%')" field=, record=0x0a file=E:\music\kkk.txt
0 rows exported at 2010-10-11 09:38:42, size 0 MB.
1000000 rows exported at 2010-10-11 09:38:46, size 8 MB.
1657868 rows exported at 2010-10-11 09:38:49, size 19 MB.
output file E:\music\kkk.txt closed at 1657868 rows, size 19 MB.
D:\ociuldr>
------------End---------------
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9932141/viewspace-677387/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- SQLServer匯出匯入資料到MySQLServerMySql
- PHP 匯出大資料 CSV 檔案PHP大資料
- Sqoop匯出ClickHouse資料到HiveOOPHive
- SQLSERVER匯出TXT文字檔案,ORACLE SQL LOADER匯入TXT文字檔案SQLServerOracle
- Java 匯入資料到Excel並提供檔案下載介面JavaExcel
- Vue匯出資料到Excel電子表格VueExcel
- 從CSV檔案匯入資料到Analytics Cloud裡建立模型和StoryCloud模型
- Oracle 資料匯入匯出Oracle
- Oracle資料匯入匯出Oracle
- waterdrop匯出hdfs資料到clickhouse(text,csv,json)JSON
- 【ASK_ORACLE】一眼判斷出Oracle的dmp檔案是用expdp匯出還是exp匯出Oracle
- (十一)Electron 匯入匯出檔案
- C#快速匯出百萬級資料到Excel方法C#Excel
- 利用跳板機連線mysql,匯出資料到csvMySql
- 2.7.8 匯出伺服器引數檔案(SPFILE)伺服器
- java匯出CSV檔案Java
- js 匯出檔案流JS
- java匯出Excel檔案JavaExcel
- oracle資料匯出匯入(exp/imp)Oracle
- MongoDB日常運維-07遠端匯出資料到execlMongoDB運維
- [Docker核心之容器、資料庫檔案的匯入匯出、容器映象的匯入匯出]Docker資料庫
- php讀取excel檔案資料的匯入和匯出PHPExcel
- spark sql與mysql 資料載入與匯出資料到mysqlSparkMySql
- java模板匯出PDF檔案Java
- PHP 匯出 CSV 格式檔案PHP
- Swagger匯出Api文件檔案SwaggerAPI
- Android studio匯出apk檔案AndroidAPK
- Navicat如何匯入和匯出sql檔案SQL
- EasyExcel完成excel檔案的匯入匯出Excel
- Oracle資料泵匯出匯入(expdp/impdp)Oracle
- Oracle資料泵的匯入和匯出Oracle
- Python求取資料夾內的檔案數量、子資料夾內的檔案數量Python
- SQLServer匯入大CSV檔案SQLServer
- 4242.全文檢索與檔案匯出試驗, ④檔案完整路徑,使用“匯出→資料夾” ,匯出為網址,無法使用...
- Oracle資料庫匯入匯出。imp匯入命令和exp匯出命令Oracle資料庫
- oracl 資料庫 sqlplus 匯出資料為sql檔案資料庫SQL
- oracle匯入dmp檔案win10怎麼操作_win10系統oracle如何匯入dmp檔案OracleWin10
- LightDB 22.4 新特性之相容Oracle sqluldr2OracleSQL
- oracle匯入dmp檔案的2種方法Oracle