【发布时间】:2014-03-04 13:07:54
【问题描述】:
为此我尝试将 csv 文件数据加载到 external_tables 中
create table ext_table_csv (
i Number,
n Varchar2(20),
m Varchar2(20)
)
organization external (
type oracle_loader
default directory ext_dir
access parameters (
records delimited by newline
fields terminated by ','
missing field values are null
)
location ('f
ile.csv')
)
reject limit unlimited;
但我得到了错误
Error starting at line 8 in command:
create table ext_table_csv (
i Number,
n Varchar2(20),
m Varchar2(20)
)
organization external (
type oracle_loader
default directory ext_dir
access parameters (
records delimited by newline
fields terminated by ','
missing field values are null
)
location ('f
ile.csv')
)
reject limit unlimited
Error at Command Line:15 Column:23
Error report:
SQL Error: ORA-06564: object DATA_DIR does not exist
06564. 00000 - "object %s does not exist"
*Cause: The named object could not be found. Either it does not exist
or you do not have permission to access it.
*Action: Create the object or get permission to access it.
我要做的是我想从 ftp 位置读取 csv 文件。有什么办法可以实现吗?
【问题讨论】:
-
为什么create语句有
default directory ext_dir但错误是default directory data_dir?您是否在创建外部表之前创建了 Oracle 目录?
标签: sql oracle csv external-tables