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 ...
随机推荐
- 使用NodeJs搭建的小型web应用
原文英文链接:http://www.nodebeginner.org 中文翻译链接:http://www.nodebeginner.org/index-zh-cn.html 学习链接:一本全面的Nod ...
- 系统测试用例评审checklist
规则要素内容 使用范围 审查结果 “否”的理由 “免”的理由 规则 建议 是 否 免 规范性规则 用例是否按照公司规定的模板进行编写? √ 用例的 ...
- MyBatis基本配置和实践(二)
一.前言 从上一篇文章的junit单元测试环节可以看到,每一次调用MyBatis需要先加载SqlMapConfig.xml文件,再通过SqlSessionFactoryBuilder创建SqlSess ...
- RN 解决CFBundleIdentifier", Does Not Exist
mac环境下,在命令行中run-ios构建时报错:CFBundleIdentifier", Does Not Exist 打开XCode,进入.xcodeproj文件,运行,编译时报错:'b ...
- int占几个字节?
class Program19 { static void Main(string[] args) { // true,或false Console.WriteLine("bool占用:&q ...
- JDBC连接数据库反射实现O/R映射
测试preparedStatement public void testPreparedStatement(){ Connection connection=null; PreparedStateme ...
- 使用dsoframer控件出现"Unable to display the inactive document. Click here to reactivate the document."的问题 .
使用如下属性设置: axFramerControl.ActivationPolicy = DSOFramer.dsoActivationPolicy.dsoKeepUIActiveOnAppDeact ...
- 实用的JS正则表达式(手机号码/IP正则/邮编正则/电话等)
//校验是否全由数字组成 function isDigit(s) { var patrn=/^[0-9]{1,20}$/; if (!patrn.exec(s)) return false retur ...
- [翻译] JHChainableAnimations
JHChainableAnimations - (void)animationType_01 { /* * 缩放到0.8倍(执行spring动画效果的缩放)持续时间0.5s,完成了之后移动100的距离 ...
- 使用CALayer制作View的辉光效果
使用CALayer制作View的辉光效果 实现以下的辉光效果: 思路是这样子的: 1. 创建好需要实现辉光效果的View 2. 对这个View进行截图 3. 将这个截图重新添加进View中 4. 对这 ...