执行ODCIEXTTABLEOPEN标注时出错

时间:2014-05-06 07:14:18

标签: oracle

我在oracle中使用外部表的功能时收到以下错误消息。

ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-00554: error encountered while parsing access parameters
KUP-01005: syntax error: found "field": expecting one of: "badfile,
byteordermark, characterset, column, data, delimited, discardfile,
disable_directory_link_check, fields, fixed, load, logfile, language,
nodiscardfile, nobadfile, nologfile, date_cache, preprocessor, readsize,
string, skip, territory, variable"

实际上,我使用下面的命令

创建了一个表
CREATE TABLE SUMIT (
NAME VARCHAR2(20),
AGE INTEGER)
ORGANIZATION EXTERNAL ( TYPE ORACLE_LOADER DEFAULT DIRECTORY TEST_FILES ACCESS PARAMETERS (RECORDS DELIMITED BY NEWLINE
FIELD TERMINATED BY ',') LOCATION ('feed.txt'));

并且表已成功创建。当我试图查看表的内容然后我收到错误。目录对象TEST_FILES也是正确的。我检查过 路径以及文件名feed.txt。以下是feed.txt

的结构
sumit,123

我正在使用Linux环境。请帮我解决这个问题。

1 个答案:

答案 0 :(得分:2)

如所有the examplesSQL*Loader documentation以及您引用的错误消息所示,fields不是field

CREATE TABLE SUMIT (
  NAME VARCHAR2(20),
  AGE INTEGER
)
ORGANIZATION EXTERNAL (
  TYPE ORACLE_LOADER DEFAULT DIRECTORY TEST_FILES ACCESS PARAMETERS (
    RECORDS DELIMITED BY NEWLINE
    FIELDS TERMINATED BY ','
  )
  LOCATION ('feed.txt')
);