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 ...
随机推荐
- (WCF) 利用WCF实现两个Process之间的通讯。
目的: 实现两个独立的Process 之间的通讯. 实现思路: 建立一个WCF Service,然后将其Host到一个Console 程序中,然后在另外一个Console程序中引用WCF的Servic ...
- Python power spectral 功率谱
You can also use scipy.signal.welch to estimate the power spectral density using Welch’s method. Her ...
- 使用@Value进行静态常量的值注入
@Component public class ExpressConstant { public static String URL; @Value("${express.url}" ...
- centos下安装ipython(minglnghang命令行)
下载文件 wget https://bootstrap.pypa.io/get-pip.py --no-check-certificate 执行安装 python get-pip.py 这就安装好了 ...
- SQL Server ->> 高可用与灾难恢复(HADR)技术之 -- Windows故障转移群集
WSFC 群集 (WSFC cluster)“Windows Server 故障转移群集”(WSFC) 群集是一组独立的服务器,它们共同协作以提高应用程序和服务的可用性. 故障转移群集实例 (Fail ...
- JpaRepository 查询规范
1.JpaRepository支持接口规范方法名查询.意思是如果在接口中定义的查询方法符合它的命名规则,就可以不用写实现,目前支持的关键字如下. Keyword Sample JPQL snippet ...
- sort 、sorted、range、join方法 数字的正序、倒叙、翻转
大家可以想象一下 如果一串数字 是混乱的没有顺序这个时候你想要排序怎么办呢? 这个时候顺势而生的就有了sort方法 把数字从大到小的排列----->sort() 只对列表 li = [3, 5 ...
- Effective C++(10) 重载赋值操作符时,返回该对象的引用(retrun *this)
问题聚焦: 这个准则比较简短,但是往往就是这种细节的地方,可以提高你的代码质量. 细节决定成败,让我们一起学习这条重载赋值操作符时需要遵守的准则吧. 还是以一个例子开始: Demo // 连锁赋值 x ...
- 前端工程师使用 Deepin 笔记
笔者是一枚前端开发,在学习 Linux 的时候碰到了一个问题 —— 怎么练手?因为自己电脑上面装的是 Windows 系统,所以学习 Linux 的时候没办法进行练习,而敲指令是学习 Linux 最高 ...
- Autorelease 性能测试
__weak NSString *string_weak_ = nil; - (void)viewDidLoad { [super viewDidLoad]; // 场景 1 NSString *st ...