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 ...
随机推荐
- The String class's judging function
字符串的判断功能: package com.itheima_03; /* * Object:是类层次结构中的根类,所有的类都直接或者间接的继承自该类. * 如果一个方法的形式参数是Object,那么这 ...
- c# 获取程序目录
取得控制台应用程序的根目录方法1:Environment.CurrentDirectory 取得或设置当前工作目录的完整限定路径2:AppDomain.CurrentDomain.BaseDirect ...
- C#实现字符串相似度算法
字符串的相似性比较应用场合很多,像拼写纠错.文本去重.上下文相似性等. 评价字符串相似度最常见的办法就是: 把一个字符串通过插入.删除或替换这样的编辑操作,变成另外一个字符串,所需要的最少编辑次数,这 ...
- .net 的page的OnInit方法
/// <summary> /// 重写父类的方法,父类要执行的方法已经被覆盖 /// </summary> /// <param name="e"& ...
- mysql资源地址
http://ftp.ntu.edu.tw/MySQL/Downloads/MySQL-5.7/
- 省钱小贴士(ECS):教你如何每年省出8w+ 块
随着用户越来越多地使用阿里云的ECS服务,如何用最小的成本来保有ECS,成为用户越来越重要的关注点. 变更点 为了更好的服务客户,ECS团队调整了系统盘的最小容量限制 linux系统 core os调 ...
- 深入浅出SharePoint2007——定制搜索之无代码篇
需求: 输入值,如果多行文本列包含此搜索关键字,显示对应的查询结果. 解决方案: 使用Form Web Part和Data form web part. 1 创建list,并创建3列 选中默认的lis ...
- FZU-1608 Huge Mission 线段树(更新懒惰标记)
题目链接: https://cn.vjudge.net/problem/FZU-1608 题目大意: 长度n,m次操作:每次操作都有三个数:a,b,c:意味着(a,b]区间单位长度的价值为c,若某段长 ...
- 「bzoj 4184: shallot」
权限题 线段树分治加线性基 首先这个题要求删除线性基肯定是没法处理的 于是我们套上一个线段树分治 线段树分治就是一种能够避免删除的神仙操作 我们发现询问是对一个时间的单点询问,而每一个数存在的时间却是 ...
- 【jQuery】cookie插件
通过该插件的学习使我对cookie.Date().getDate().setDate().toUTCString()有了更直观的了解,具体分析见注释: function(key, value, opt ...