0

尽管我已将文件放置在正确的位置,但我收到文件未找到错误。

我创建了一个目录 CREATE 或替换 DIRECTORY ext_directory AS '/usr/apps/datafiles';

我已授予对 ext_directory 的读写权限。GRANT READ WRITE ON DIRECTORY ext_directory TO MY_DEV;

然后我创建了一个外部表:

CREATE TABLE CUSTOMER_DTL_EXT(Customer_Number CHAR(10), Forename VARCHAR2(40), Surname     VARCHAR2(40), Date_Birth VARCHAR2(8)
organization external
(
type oracle_loader default directory ext_directory access parameters
(
records delimited by newline
NOBADFILE NODISCARDFILE NOLOGFILE
FIELDS TERMINATED BY ‘|’

) location (‘SAMPLE.TXT’)
);

我也使用过 chmod 777 SAMPLE.TXT

但是,当我运行查询时:

Select * from CUSTOMER_DTL_EXT;

我收到以下错误:

ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-04040: file SAMPLE.TXT in ext_directory not found
29913. 00000 -  "error in executing %s callout"
*Cause:    The execution of the specified callout caused an error.
*Action:   Examine the error messages take appropriate action.

谁能告诉我文件 SAMPLE.TXT 应该放在哪里。我把它放在'/usr/apps/datafiles' 下。

我已经检查了这个链接,但这并没有解决我的问题:

从外部表中选择时出现 sqlplus 错误:ORA-29913:执行 ODCIEXTTABLEOPEN 标注时出错

4

0 回答 0