文档课题:运用SQL Loader导入数据.
数据库:oracle 11.2.0.4
1、建控制文件
[oracle@leo-oracle-11g ~]$ vi ldr_case1.ctl
LOAD DATA
INFILE *
INTO TABLE BONUS
FIELDS TERMINATED BY ","
(ENAME,JOB,SAL)
BEGINDATA
SMITH,CLEAK,3904
ALLEN,SALESMAN,2891
WARD,SALESMAN,3128
KING,PRESIDENT,2523
2、建表结构
[oracle@leo-oracle-11g ~]$ sqlplus leo/[email protected]:1521/orcl
SQL*Plus: Release 11.2.0.4.0 Production on Mon Jun 26 01:46:38 2023
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
[email protected]:1521/orcl> create table bonus (ename varchar2(20),job varchar2(20),sal number);
Table created.
3、导入数据
[oracle@leo-oracle-11g ~]$ sqlldr leo/leo control=ldr_case1.ctl
SQL*Loader: Release 11.2.0.4.0 - Production on Mon Jun 26 01:49:35 2023
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
Commit point reached - logical record count 4
[email protected]:1521/orcl> select * from bonus;
ENAME JOB SAL
-------------------- -------------------- ----------
SMITH CLEAK 3904
ALLEN SALESMAN 2891
WARD SALESMAN 3128
KING PRESIDENT 2523
参考网址:https://blog.csdn.net/u011364306/article/details/50591847/
标签:11g,0.4,11.2,leo,导入,SQL,oracle,Loader
From: https://blog.51cto.com/u_12991611/6561897