ORACLE->SQL*Loader[20180712]
Fixed Record Format
固定长度 INFILE datafile_name "fix n"
固定11个字节
[oracle@pcqtestxi01 ~]$ cat example.ctl example.dat
----example.ctl ----
load data
infile 'example.dat' "fix 11"
into table example
fields terminated by ',' optionally enclosed by '"'
(col01,col02)
----example.dat ----
001, cd, 0002,fghi,
00003,lmn,
1, "pqrs",
0005,uxwx,
[oracle@pcqtestxi01 ~]$ sqlldr monitor/password control=example.ctl
SQL*Loader: Release 11.2.0.4.0 - Production on Tue Jun 12 11:45:16 2018
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
Commit point reached - logical record count 5
查询加载成功的数据
SQL> select * from dbmonitor.example;
COL01 COL02
----- --------------------------------------------------
001 cd
0002 fghi
00003 lmn
1 pqrs
0005 uxwx Variable Record Format
变量记录格式 INFILE datafile_name "var n"
[oracle@pcqtestxi01 ~]$ cat example01.ctl example01.dat
----example01.ctl------
load data
infile 'example01.dat' "var 3"
into table example
fields terminated by ',' optionally enclosed by '"'
(col01 char(5),
col02 char(7))
----example01.dat------
009hello,cd,010world,im,
012my,name is,
[oracle@pcqtestxi01 ~]$ sqlldr monitor/password control=example01.ctl
SQL*Loader: Release 11.2.0.4.0 - Production on Tue Jun 12 11:41:03 2018
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
Commit point reached - logical record count 3
[oracle@pcqtestxi01 ~]$ dba
SQL*Plus: Release 11.2.0.4.0 Production on Tue Jun 12 11:41:06 2018
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select * from dbmonitor.example;
COL01 COL02
----- --------------------------------------------------
hello cd
world im
my name is Stream Record Format
流记录格式 INFILE datafile_name ["str terminator_string"]
terminator_string被指定为'char_string'或X'hex_string',其中:
'char_string'是用单引号或双引号括起来的字符串
X'hex_string'是一个十六进制格式的字节串
当terminator_string包含特殊(不可打印)字符时,应该将其指定X'hex_string。但是通过使用反斜杠,可以将一些不可打印的字符指定为(‘char_string’)
\ n表示换行
\ t表示一个水平标签
\ f表示换页
\ v表示一个垂直选项卡
\ r表示回车
|
Result
|
Exit Code
|
|
All rows loaded successfully
|
EX_SUCC
|
|
All or some rows rejected
|
EX_WARN
|
|
All or some rows discarded
|
EX_WARN
|
|
Discontinued load
|
EX_WARN
|
|
Command-line or syntax errors
|
EX_FAIL
|
|
Oracle errors nonrecoverable for SQL*Loader
|
EX_FAIL
|
|
Operating system errors (such as file open/close and malloc)
|
EX_FAIL
|
|
Table 9-2 Datatype Conversions for Datetime and Interval Datatypes
|
|
|
SQL*Loader Datatype
|
Oracle Database Datatype (Conversion Support)
|
|
N
|
N (Yes), C (Yes), D (No), T (No), TS (No), YM (No), DS (No)
|
|
C
|
N (Yes), C (Yes), D (Yes), T (Yes), TS (Yes), YM (Yes), DS (Yes)
|
|
D
|
N (No), C (Yes), D (Yes), T (No), TS (Yes), YM (No), DS (No)
|
|
T
|
N (No), C (Yes), D (No), T (Yes), TS (Yes), YM (No), DS (No)
|
|
TS
|
N (No), C (Yes), D (Yes), T (Yes), TS (Yes), YM (No), DS (No)
|
|
YM
|
N (No), C (Yes), D (No), T (No), TS (No), YM (Yes), DS (No)
|
|
DS
|
N (No), C (Yes), D (No), T (No), TS (No), YM (No), DS (Yes)
|
ORACLE->SQL*Loader[20180712]的更多相关文章
- [Oracle] SQL*Loader 详细使用教程(2)- 命令行参数
sqlldr工具 SQL*Loader的客户端工具是sqlldr,在操作系统的命令行下输入sqlldr,后面不接任何参数,将显示帮助信息如下所示(所有命令行参数的简单描述及其默认值),所以你并不需 ...
- [Oracle] SQL*Loader 详细使用教程(3)- 控制文件
控制文件是SQL*Loader里最重要的文件,它是一个文本文件,用来定义数据文件的位置.数据的格式.以及配置数据加载过程的行为,在sqlldr中以control参数指定控制文件. 在控制文件里配置 ...
- [Oracle] SQL*Loader 详细使用教程(1)- 总览
SQL*Loader原理 SQL*Loader是Oracle提供的用于数据加载的一种工具,它比较适合业务分析类型数据库(数据仓库),能处理多种格式的平面文件,批量数据装载比传统的数据插入效率更高. ...
- [Oracle] SQL*Loader 详细使用教程(4)- 字段列表
在上一篇中我们介绍了SQL*Loader中最重要的文件——控制文件,而本篇要介绍控制文件中最重要的部分——字段列表,字段列表的作用是把数据文件中的记录和数据库中表的列对应起来,下面是字段列表的一个例子 ...
- Oracle SQL Loader
C:/Documents and Settings/WWJD>sqlldr SQL :: Copyright (c) , , Oracle. All rights reserved. 用法: S ...
- Oracle Sql Loader的学习使用
最近由于遇到oracle控制文件的使用,虽然不是很复杂,但是从来没有用过,专门花点时间看看.点击 这里 查看详细 1,概述: Sql Loader: 一个批量工具,将文件数据导入到数据库.可以导入一个 ...
- Oracle SQL*Loader commit point tips
http://www.dba-oracle.com/t_sql_loader_commit_frequency.htm - Question: Can I control the commit fr ...
- [Oracle] SQL*Loader 详细使用教程(5)- 典型例子
本文介绍SQL*Loader在实际使用过程中经常用到的典型例子. 1. 表中的列比数据文件的列要少怎么办? 假设一个csv的文件如下: a1,a2,a3,a4 b1,b2,b3,b4 c1,c2,c3 ...
- Oracle SQL*Loader 数据导入工具
SQL*Loader是一个向Orale大量倒数据的工具,可以从界定文件中导入数据如用 , 界定的,可以从定宽的文件导入数据,
- oracle之数据同步:Oracle Sql Loader使用说明(大批量快速插入数据库记录)
1.准备表数据 select * from emp10; create sequence seq_eseq increment start maxvalue ; --得到序列的SQL语句 select ...
随机推荐
- [转]开源日志库<log4cplus+VS2008使用>整理
转 开源日志库<log4cplus+VS2008使用>整理 转http://pyhcx.blog.51cto.com/713166/143549 一.简介 log4cplus是C+ ...
- zabbix fast
源码安装步骤 来源它站: 官方文档:https://www.zabbix.com/documentation/2.4/manual/installation/install#from_the_sour ...
- ActiveMQ5.8.0安装及启动
一.下载 官网地址:http://activemq.apache.org/download.html Windows版本:apache-activemq-5.8.0-bin.zip Linux版本:a ...
- 使用dsoframer控件出现"Unable to display the inactive document. Click here to reactivate the document."的问题 .
使用如下属性设置: axFramerControl.ActivationPolicy = DSOFramer.dsoActivationPolicy.dsoKeepUIActiveOnAppDeact ...
- C#中Array、ArrayList和List三者的区别
1.Array 在C#中最早出现的.在内存中是连续存储的,所以它的索引速度非常快,而且赋值与修改元素也很简单. 它的空间大小是固定的,空间不够时也不能再次申请,所以需要事前确定合适的空间大小. 2. ...
- 给腾讯云Linux主机创建Swap文件
新买的腾讯云主机没有提供Swap分区 理由是由于主机经常因为内存使用率过高,频繁使用Swap,导致磁盘IO过高,服务器整体性能反而下降. 不过用户依然可以使用Swap文件的方式添加Swap. 方法如下 ...
- Reporting Service编程----访问Web服务
将报表服务器 Web 服务的引用添加到项目中后,下一步是创建 Web 服务代理类的实例. 然后,您可以通过调用代理类中的方法来访问 Web 服务的方法. 当你的应用程序调用这些方法时,代理类生成的代码 ...
- Dictionary<Tkey.TValue>与SortedList
一.概述 表示Key/Value集合,可以添加删除元素,允许按Key来访问元素.是Hashtable的泛型等效类. 它需要一个相等实现来确定键是否相等,可以使用实现了IEqualityComparer ...
- 把所有的小图标一起做成雪碧图吧 请用gulp-css-spriter.
用gulp-css-spriter很简单. 第一步: 在某个文件夹用shitf+鼠标右键 第二步: npm install gulp-css-spriter https://www.npmjs.com ...
- 【转】ios 抓取 tcp/udp 包
原文: http://useyourloaf.com/blog/2012/02/07/remote-packet-capture-for-ios-devices.html Remote Packet ...