Question

I have created the following external table on Oracle 10G.

 connect system/password as SYSDBA
 create or replace directory ext_tab as 'C:\Suman\External_Tables';
 CREATE TABLE emp_ext_3( 
    empno NUMBER(4), first_name CHAR(20), last_name CHAR(20), dob     CHAR(10))
    ORGANIZATION EXTERNAL( 
    TYPE ORACLE_LOADER DEFAULT DIRECTORY ext_tab
    ACCESS PARAMETERS
    ( 
    RECORDS DELIMITED BY NEWLINE 
    NOBADFILE
    NOLOGFILE
    SKIP 1    
    FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'  LRTRIM  
    MISSING FIELD VALUES ARE NULL  
    REJECT ROWS WITH ALL NULL FIELDS 
    (empno INTEGER EXTERNAL (4),
    first_name CHAR(20),
    last_name CHAR(20),
    dob CHAR(10) DATE_FORMAT DATE MASK "dd/mm/yyyy") 
    ) 
    LOCATION ('employee1.dat')
    )
    PARALLEL 
    REJECT LIMIT 0;  

Now If I try to execute select command, I am getting following error.

SQL> select * from "SYSTEM"."EMP_EXT_3";
select * from "SYSTEM"."EMP_EXT_3"
*
ERROR at line 1:
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-04040: file employee1.dat in EXT_TAB not found
ORA-06512: at "SYS.ORACLE_LOADER", line 19

But I have the file "employee1.dat" in 'C:\Suman\External_Tables'. Can someone please help me on why I am getting this error?

Was it helpful?

Solution

The Oracle server is looking for a file in the following location: 'C:\Suman\External_Tables'. That directory is on the Oracle server machine, not your local Windows client machine.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top