我按照http://www.eygle.com/archives/2005/07/eciousqlloadero.html
的步骤测试了一下,发现报错ORA-02248:
SQL> show user
USER 为"CJF"
SQL> create table T_LOAD
2 (
3 A VARCHAR2(10),
4 B VARCHAR2(10),
5 C DATE
6 );
表已创建。
其中e:\doc\contdate.ctl内容如下:
load data
infile 'e:\doc\date.txt'
badfile 't.bad'
append into table t_load
fields terminated by ','
trailing nullcols
(
a,
b,
c date "yyyy-mm-dd hh24:mi:ss"
)
而e:\doc\date.txt的内容如下:
aaaaa,xxxxx,2005-01-01 01:00:00
bbbbb,yyyyy,2005-03-01 12:00:00
ccccc,zzzzz,2005-12-01 18:00:00
E:\doc>dir date.txt
驱动器 E 中的卷是 DISK1_VOL3
卷的序列号是 7095-4785
E:\doc 的目录
2006-05-11 16:31 99 date.txt
1 个文件 99 字节
0 个目录 5,896,814,592 可用字节
E:\doc>dir contdate.ctl
驱动器 E 中的卷是 DISK1_VOL3
卷的序列号是 7095-4785
E:\doc 的目录
2006-05-11 16:33 171 contdate.ctl
1 个文件 171 字节
0 个目录 5,896,814,592 可用字节
E:\doc>
C:\Documents and Settings\new>set nls_lang=AMERICAN_AMERICA.ZHS16GBK
C:\Documents and Settings\new>sqlldr userid=cjf/cjf@cjf control='e:\doc\contdate
.ctl' log='e:\doc\sqlldrtdate.txt'
SQL*Loader: Release 9.2.0.1.0 - Production on Thu May 11 16:32:21 2006
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
SQL*Loader-128: unable to begin a session
ORA-00604: error occurred at recursive SQL level 1
ORA-02248: invalid option for ALTER SESSION
C:\Documents and Settings\new>