Database Reference
In-Depth Information
Next, I rerun my INSERT statement:
EODA@ORA12CR1> list
1 INSERT /*+ append */ INTO DEPT
2 (
3 DEPTNO,
4 DNAME,
5 LOC
6 )
7 SELECT
8 "DEPTNO",
9 "DNAME",
10 "LOC"
11* FROM "SYS_SQLLDR_X_EXT_DEPT"
EODA@ORA12CR1> /
4 rows created.
EODA@ORA12CR1> host ls -l demo1.log_xt
-rw-r----- 1 oracle dba 687 Mar 8 14:35 demo1.log_xt
You can see that this time I accessed the file, I successfully loaded four rows, and the log file was created and
in fact is owned by “oracle,” not by my operating system account.
Running SQLLDR in Express Mode
Starting with Oracle 12 c , SQLLDR express mode allows you to quickly load data from a CSV file into a table. If the
schema you're using has CREATE ANY DIRECTORY privilege, then express mode will attempt to use an external table
to load the data. Otherwise it will use SQLLDR in direct path mode.
A simple example will illustrate this. Suppose you have a table created as follows:
EODA@ORA12CR1> create table dept
2 ( deptno number(2) constraint dept_pk primary key,
3 dname varchar2(14),
4 loc varchar2(13)
5 )
6 /
And you have the following data stored in a CSV file named dept.dat :
10,Sales,Virginia
20,Accounting,Virginia
30,Consulting,Virginia
40,Finance,Virginia
 
Search WWH ::




Custom Search