在外部表的文件中,若文件中的字段由ctrl+F来分割,由于ctrl+F分隔符在中文后面无法被识别,使得外部表导入出现问题,解决办法是在 创建外部表的过程中加入:
characterset 'AL32UTF8'
例:
drop table tablename
create table tablename
(
id
var char2(40),
age
int,
name
varchar2(40),
)
Organization External
(
type Oracle_Loader
default Directory Extfile_data
Access parameters
(
records delimited by newline
badfile ExtFile_bad:'tablename_%a_%p.bad'
logfile Extfile_log:'tablename_%a_%p.log'
characterset 'AL32UTF8'
fields terminated by x'06'
missing field values are null
(
id
char(40),
age
,
name
char(40)
)
)
Location ('filename')
)
Parallel
Reject limit Unlimited;