虽然我已将文件放在正确的位置,但我收到的文件未找到错误。
我创建了一个目录 创建或替换DIRECTORY ext_directory AS' / usr / apps / datafiles';
我已授予ext_directory读写权限。 授予读取目录ext_directory写入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 error on select from external table: ORA-29913: error in executing ODCIEXTTABLEOPEN callout