【20150622 】sqlldr及ctl文件
来源:互联网 发布:怎么在淘宝上注册网店 编辑:程序博客网 时间:2024/05/21 06:27
sqlldr的使用方法为SQLLDR keyword=value [,keyword=value,...]。
其中常用的关键字及使用示例可参考http://blog.knowsky.com/257572.htm
可以预先编写好ctl文件,将控制、格式写于ctl文件中再直接使用sqlldr进行输出,其使用方式如下:
sqlldr userid=$USER/$PASSWORD@$INS log=$Table_Log bad=$Table_Bad control=$Table_Ctl data=$Table_Data 其中 log,bad,control,data分别为日志,坏档,控制和来源数据文件
其中,ctl文件的详情可以参考官方文件
http://docs.oracle.com/cd/B19306_01/server.102/b14215/ldr_control_file.htm#i1005907
The SQL*Loader control file is a text file that contains data definition language (DDL) instructions. DDL is used to control the following aspects of a SQL*Loader session:
Where SQL*Loader will find the data to load
How SQL*Loader expects that data to be formatted
How SQL*Loader will be configured (memory management, rejecting records, interrupted load handling, and so on) as it loads the data
How SQL*Loader will manipulate the data being loaded
目前使用的实例及解释如下:
load data --声明这是新的data load
characterset ZHS16GBK--载入字符集
into table F_CKZHFTP
Append—载入方式,可选的有append和truncate
fields terminated by ','—值域间隔
optionally enclosed by '"'—包含方式(与下面的trainlingnullcols配套可以在row中插入空值)
trailing nullcols –未有值的域写入null
(
SYS_BIZ_DATE "trim(:SYS_BIZ_DATE)", --trim函数去除空格(?)
AC_ID "trim(:AC_ID)",
AC_SEQ "trim(:AC_SEQ)",
SUBJECT_CD "trim(:SUBJECT_CD)",
……)
sqlplus及ctl文件中均可指定 data source, bad file等,视需求决定在何处指定这些文件
- 【20150622 】sqlldr及ctl文件
- SQLLDR CTL文件
- SQLLDR—CTL文件
- SQLLDR——CTL文件:字段设置
- sqlldr默认字符串最大长度修改和ctl文件的格式
- 在oracle中 生成大规模数据 500万条 (使用导入数据方式 sqlldr 导入命令 *.ctl文件)
- 导入ctl文件
- ctl
- ctl
- sql load的CTL文件
- sqlldr控制文件详解
- GrADS描述文件(CTL)解析器 (1)
- GrADS描述文件(CTL)解析器 (2)
- grads处理多个ctl文件
- ActiveX中的ctl文件几个释义
- CTL控制文件的小感悟
- sqlloader中ctl文件相关参数
- 自动生成控制文件及数据文件并完成sqlldr的自动导入
- 页的疑问???
- POJ 1528 && HDU 1323 Perfection(水~)
- MySQL优化之——索引
- android的activity总结
- leetCode(23):Binary Tree Zigzag Level Order Traversal
- 【20150622 】sqlldr及ctl文件
- CentOS 安装Oracle 11g R2
- IOS_核心动画 CoreAnimation
- 二叉树系列:初探二叉树,c语言实现
- iOS_小问题积累(类中c语言函数的调用)
- PAT(A) 1088. Rational Arithmetic & PAT(B) 1034. 有理数四则运算(20)
- CTP: 接收心跳超时Bug
- Analist.2015.Win32_64 2CD(土地测量及三维曲面建模的软件)
- Visual Studio快捷键(持续更新)