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 ...
随机推荐
- Google Protocol Buffer 的使用(未完待续)
简介 Google Protocol Buffer( 简称 Protobuf) 是 Google 公司内部的混合语言数据标准,目前已经正在使用的有超过 48,162 种报文格式定义和超过 12,183 ...
- Android 获取SD卡的图片资源
首先我先获得SD卡下的根目录路径: privateString isSdcard(){ File sdcardDir=null; boolean isSDExist=Environment.getEx ...
- Bootstrap 在线引用
Bootstrap 3.3.0 js 文件 <script src="http://cdn.bootcss.com/bootstrap/3.3.0/js/bootstrap.min.j ...
- vue2.0中的计算属性
计算属性是一个很邪门的东西,只要在它的函数里引用了data中的某个属性,当这个属性发生变化的时候,函数仿佛可以嗅探到这个变化,并自动重新执行. 上代码会源源不断的打印出a的值.如果希望b依赖data中 ...
- 本地调试接口返回信息不对 以及 jar冲突问题
今天下午在本地调试的时候碰到个很奇怪的问题:服务调用接口,返回的明明是有数据的,然后通过gson转换对象后,对象里面并没有自己想要的数据.看了代码什么的都没有问题.思考到底是哪里出了问题,想了半天想到 ...
- docker容器修改hosts文件,重启失效问题解决
docker容器修改hosts文件 搜了一大批资料,有说需要在docker run --hosts...改:dockerfile改:有点麻烦,下面方案比较好: 参照docker吧(https://ti ...
- 使用普通用户set autotrace on报错SP2-0618: Cannot find the Session Identifier
普通用户使用 autotrace,出现如下报错: SQL> set autotrace on SP2-0618: Cannot find the Session Identifier. Che ...
- ubuntu 13.10 无法播放 mp3
添加源: #deb cdrom:[Ubuntu 13.10 _Saucy Salamander_ - Release i386 (20131016.1)]/ saucy main restricted ...
- Codeforces Round #441 (Div. 2)【A、B、C、D】
Codeforces Round #441 (Div. 2) codeforces 876 A. Trip For Meal(水题) 题意:R.O.E三点互连,给出任意两点间距离,你在R点,每次只能去 ...
- IPUtils 工具类
package com.hxqc.basic.dependency.util; import org.apache.commons.lang.StringUtils; import javax.ser ...