ociuldr 支持分多个数据文件
来源:互联网 发布:淘宝店铺平台收费标准 编辑:程序博客网 时间:2024/05/22 04:43
用ociuldr工具,可以支持生成多个数据文件,并通过bcp方式导入到sqlserver中,速度狠理想。
ociuldr工具默认一个batch是50W条记录(即:batch=2表示100W条记录生成一个文件),通过指定file选项来定义生成的数据文件名,中间请用包含” %b “字样,
” %b “ 会被打印成序列号:
在虚拟机模拟如下:
SQL> select count(*) fromyoon;
COUNT(*)
----------
7340032
SQL> exit
Disconnected from Oracle Database 11gEnterprise Edition Release 11.2.0.3.0 - 64bitProduction
With the Partitioning, OLAP, DataMining and Real Application Testing options
1. 将ociuldr工具上传至BIN目录下
2. chown oracle.oinstall ociuldr
3. chmod 775 ociuldr
[oracle@db01 ~]$ ociuldr -help
Usage: ociuldr user=... query=... field=... record=...file=...
(@) Copyright Lou Fangxin 2004/2005, all rights reserved.
Notes:
-si = enable logon as SYSDBA
user = username/password@tnsname
sql = SQL file name
query = select statement
field = seperator string between fields
record= seperator string between records
file = output file name(default: uldrdata.txt)
read = set DB_FILE_MULTIBLOCK_READ_COUNT at session level
sort = set SORT_AREA_SIZE & SORT_AREA_RETAINED_SIZE at sessionlevel (UNIT:MB)
hash = set HASH_AREA_SIZE at session level (UNIT:MB)
serial= set _serial_direct_read to TRUE at session level
trace = set event 10046 to given level at session level
table = table name in the sqlldr control file
mode = sqlldr option, INSERT or APPEND or REPLACE or TRUNCATE
log = log file name, prefix with + to append mode
long = maximum long field size
array = array fetch size
buffer= sqlldr READSIZE and BINDSIZE, default 16 (MB)
for field and record, you can use '0x' to specify hex charactercode,
\r=0x0d \n=0x0a |=0x7c ,=0x2c \t=0x09[oracle@db01 ~]# su -oracle
[oracle@db01 ~]$ ociuldr user=scott/tiger@orcl query="select * from scott.yoon"field='<[!]>' record='<[end]>' file=/u01/yoon_%b.txttable=scott.yoon batch=2
2050 bytes allocated for column EMPNO (1)
550 bytes allocated for column ENAME(2)
500 bytes allocated for column JOB(3)
2050 bytes allocated for column MGR(4)
1050 bytes allocated for columnHIREDATE (5)
2050 bytes allocated for column SAL(6)
2050 bytes allocated for column COMM(7)
2050 bytes allocated for columnDEPTNO (8)
0 rows exported at 2014-10-3001:13:21
500000 rows exported at 2014-10-3001:13:46
1000000 rows exported at 2014-10-3001:14:15
output file /u01/yoon_1.txt closed at1000000 rows.
500000 rows exported at 2014-10-3001:14:40
1000000 rows exported at 2014-10-3001:15:07
output file /u01/yoon_2.txt closed at1000000 rows.
500000 rows exported at 2014-10-3001:15:36
1000000 rows exported at 2014-10-3001:16:02
output file /u01/yoon_3.txt closed at1000000 rows.
500000 rows exported at 2014-10-3001:16:29
1000000 rows exported at 2014-10-3001:16:48
output file /u01/yoon_4.txt closed at1000000 rows.
500000 rows exported at 2014-10-3001:17:05
1000000 rows exported at 2014-10-3001:17:12
output file /u01/yoon_5.txt closed at1000000 rows.
500000 rows exported at 2014-10-3001:17:17
1000000 rows exported at 2014-10-3001:17:22
output file /u01/yoon_6.txt closed at1000000 rows.
500000 rows exported at 2014-10-3001:17:27
1000000 rows exported at 2014-10-3001:17:32
output file /u01/yoon_7.txt closed at1000000 rows.
340032 rows exported at 2014-10-3001:17:38
output file /u01/yoon_8.txt closed at340032 rows.
[root@db01 u01]# ls
app backup yoon_1.txt yoon_2.txtyoon_3.txt yoon_4.txt yoon_5.txt yoon_6.txt yoon_7.txtyoon_8.txt
- ociuldr 支持分多个数据文件
- Oracle 重命名数据文件
- SQL Server 2005移动数据文件
- Oracle 数据导出 ociuldr
- RMAN 恢复实际操作(模拟数据文件…
- oracle11g 数据文件误删恢复(…
- ORACLE 11G 数据文件头格式
- 通过cat 数据文件来合并 myisam表
- Android SoftAp支持 (二)
- Android SoftAp支持 (二)
- MySQL XA 事务支持调研
- ORA-01190: 控制文件或数据文件 1 …
- MAN 恢复实际操作(模拟数据文件丢…
- sqlldr加载 数据文件的字段超出最…
- 大量数据文件恢复时,set new…
- 数据文件
- IIS支持flv文件
- eclipse 支持vim按键
- oracle 表迁移方法 (二…
- oracle 表迁移方法 (一)
- Kill 所有MySQL进程
- Laravel 生成key
- oracle 表空间和表 read…
- ociuldr 支持分多个数据文件
- Linux 挂载2T以上存储
- 此情只待成追忆时
- MySQL SHOW 语句大全
- 利用crecttracker画图,并可以串行化保存!
- oracle-审计导数
- swap分区添加
- iOS开发笔记--Facebook POP 进阶指南
- MySQL创建复合索引