用sqlloader匯入中文及數字到公司測試資料庫pd
1,配置secure crt及rhel5上面的NLS_LANG內容如下:
-bash-3.1$ env|grep LANG
NLS_LANG=SIMPLIFIED CHINESE_CHINA.utf8
LANG=en_US.UTF-8
2,sqlloader匯入資料的控制檔案內容如下:
-bash-3.1$ more insert_batch.ctl
load data
infile '/oracle/from_gbk_utf8.txt'
append into table e_schoolinfo
fields terminated by ','
(schoolid,schoolname,city,district)
3,用sqlloader進入匯入資料
sqlldr userid=pd/system control=/oracle/insert_batch.ctl log=/oracle/sqlload1.log
SQL*Loader: Release 10.2.0.4.0 - Production on 星期五 7月 2 07:04:12 2010
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Commit point reached - logical record count 64
Commit point reached - logical record count 128
Commit point reached - logical record count 192
Commit point reached - logical record count 256
Commit point reached - logical record count 320
Commit point reached - logical record count 384
Commit point reached - logical record count 448
Commit point reached - logical record count 512
Commit point reached - logical record count 576
Commit point reached - logical record count 640
Commit point reached - logical record count 704
Commit point reached - logical record count 768
Commit point reached - logical record count 832
Commit point reached - logical record count 896
Commit point reached - logical record count 960
Commit point reached - logical record count 1024
Commit point reached - logical record count 1088
Commit point reached - logical record count 1152
Commit point reached - logical record count 1216
Commit point reached - logical record count 1280
Commit point reached - logical record count 1344
Commit point reached - logical record count 1408
Commit point reached - logical record count 1472
Commit point reached - logical record count 1536
Commit point reached - logical record count 1600
Commit point reached - logical record count 1664
Commit point reached - logical record count 1728
Commit point reached - logical record count 1792
Commit point reached - logical record count 1856
Commit point reached - logical record count 1920
Commit point reached - logical record count 1984
Commit point reached - logical record count 2048
Commit point reached - logical record count 2112
Commit point reached - logical record count 2176
Commit point reached - logical record count 2240
Commit point reached - logical record count 2304
Commit point reached - logical record count 2368
Commit point reached - logical record count 2432
Commit point reached - logical record count 2496
Commit point reached - logical record count 2560
Commit point reached - logical record count 2624
Commit point reached - logical record count 2688
Commit point reached - logical record count 2752
Commit point reached - logical record count 2816
Commit point reached - logical record count 2880
Commit point reached - logical record count 2944
Commit point reached - logical record count 3008
Commit point reached - logical record count 3072
Commit point reached - logical record count 3136
Commit point reached - logical record count 3200
Commit point reached - logical record count 3264
Commit point reached - logical record count 3315
4,查對匯入的資料來源檔案為from_gbk_utf8.txt
from_gbk_utf8.txt -bash-3.1$
注:要匯入的資料來源檔案為以csv為源,轉為txt另存為utf8字符集轉化而來
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9240380/viewspace-667149/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 使用sqlloader向oracle匯入文字資料SQLOracle
- 測試TOM=SQLLOADER載入製表符號資料SQL符號
- AUL6資料匯出_sqlloader匯入總結SQL
- sqlldr批量匯入匯出資料測試SQL
- sqlldr批次匯入匯出資料測試SQL
- 匯入excel資源到資料庫Excel資料庫
- sqlloader匯入含有回車的字元資料SQL字元
- logstash匯入movielens測試資料
- 極速匯入elasticsearch測試資料Elasticsearch
- java 從EXCEL匯入到資料庫JavaExcel資料庫
- 從Excel到匯入MYSQL資料庫ExcelMySql資料庫
- SPOOL、SQLLOADER資料匯出匯入的一點小總結SQL
- Sql Server資料庫資料匯入到SQLite資料庫中Server資料庫SQLite
- 用exp/imp把遠端資料匯入到本地資料庫中資料庫
- python將目標檢測資料匯入到指定資料庫中Python資料庫
- sqlloader工具匯入oracleSQLOracle
- oracle sqlloader匯入資料的一系列方法OracleSQL
- 文字檔案用sqlldr工具匯入到oracel資料庫中SQL資料庫
- sqlloader匯入資料_資料檔案的欄位超出最大長度SQL
- EXP,EXPDP資料匯入本地效能測試
- IIS 日誌匯入到資料庫的方法資料庫
- 遠端資料庫AWR 匯入到本地分析資料庫
- 資料庫 MySQL 資料匯入匯出資料庫MySql
- Oracle資料匯入到Hive資料庫的操作方法OracleHive資料庫
- pl/sql developer將excel資料匯入到資料庫中SQLDeveloperExcel資料庫
- 使用EXPDP/IMPDP匯入匯出表中資料/後設資料測試
- oracle測試資料庫啟用Oracle資料庫
- Oracle expdp/impdp匯出匯入命令及資料庫備份Oracle資料庫
- Excel資料匯入Sql Server,部分數字為NullExcelSQLServerNull
- 資料庫的匯入匯出資料庫
- mysql 資料庫匯入匯出MySql資料庫
- MySQL資料庫匯入匯出MySql資料庫
- 大文字資料,匯入匯出到資料庫資料庫
- 把csv檔案的資料匯入到oracle資料庫中Oracle資料庫
- 【匯入匯出】將資料匯入到其他使用者
- 資料庫測試專用術語資料庫
- MySQL資料匯入匯出牛刀小試MySql
- 【mysql】資料庫匯出和匯入MySql資料庫