I have setup a simple Oracle external table test.
The database we're using is 11g. I have followed the following steps :
First I created a directory :
create or replace directory INTF_DIR AS '/orabin/hrtst/TEST/' ;
This is the external table definition:
CREATE TABLE XXHCM_LU_EXT
(
LOOKUP_TYPE VARCHAR2(200 BYTE) ,
LOOKUP_CODE VARCHAR2(200 BYTE) ,
MEANING VARCHAR2(200 BYTE) ,
ENABLED_FLAG VARCHAR2(10 BYTE)
)
ORGANIZATION EXTERNAL
(
TYPE ORACLE_LOADER
DEFAULT DIRECTORY INTF_DIR
ACCESS PARAMETERS
( RECORDS DELIMITED BY NEWLINE SKIP 1
BADFILE INTF_DIR:'lookup_code.bad'
LOGFILE INTF_DIR:'Lookup_code.log'
NODISCARDFILE FIELDS TERMINATED BY '|' OPTIONALLY ENCLOSED BY '"' MISSING FIELD VALUES ARE NULL REJECT ROWS
WITH ALL NULL FIELDS ) LOCATION ( INTF_DIR: 'Lookup_code.csv' )
)
REJECT LIMIT UNLIMITED
But when i am executing the **select * frm XXHCM_LU_EXT;**
I am getting the following error :
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
error opening file /orabin/hrtst/TEST/Lookup_code.log
Also, I checked for the permission on directory and the files :
/orabin/hrtst/TEST$ ls -l Lookup_code.csv
-rwxrwxrwx 1 xxhcmuser dba 259 Feb 29 15:37 Lookup_code.csv
/orabin/hrtst/TEST$ ls -l /orabin/hrtst/TEST/
total 8
-rwxrwxrwx 1 xxhcmuser dba 246 Feb 29 15:38 Control.ctl
-rwxrwxrwx 1 xxhcmuser dba 259 Feb 29 15:37 Lookup_code.csv
-rwxrwxrwx 1 xxhcmuser dba 0 Feb 25 15:08 Lookup_code.log
Still i am not being able to access the log file.