Oracle/ External file xyz not found
<p>Already went through numerous sites/posts, but just couldn't find any working solution.</p>

<p>I'm using Oracle 11g R2 XE on Windows and trying to create external table to load the data.</p>

<ol>
<li><p>Data file has only one line with no header:</p>

<p>AAA,BBB</p></li>
<li><p>Login to the "SYSTEM" schema/user</p></li>
<li><p>Creating a directory like the below one:</p>

<pre><code>CREATE OR REPLACE DIRECTORY rawdata
AS 'C:\...\RAW_DATA'
;
</code></pre></li>
<li><p>Creating external table:</p>

<pre><code>CREATE TABLE rawdata_import  
( col1        VARCHAR2(3)  
, col2        VARCHAR2(3))  
ORGANIZATION EXTERNAL  
( TYPE ORACLE_LOADER  
  DEFAULT DIRECTORY rawdata  
    ACCESS PARAMETERS  
    ( RECORDS DELIMITED BY NEWLINE  
      NOBADFILE   
      NODISCARDFILE   
      NOLOGFILE  
      FIELDS TERMINATED BY ','
    )  
    LOCATION ('rawdata.csv'));
</code></pre></li>
<li><p>When executing simple SELECT statement:</p>

<pre><code>SELECT * FROM rawdata_import
;
</code></pre></li>
</ol>

<p>I can see the below error. </p>

<pre><code>ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-04040: file rawdata.csv in RAWDATA not found
</code></pre>

<p>Many thanks to anyone who can help on this one.</p>

<p>Rafal.</p>