database - Oracle 11g External Table error -


i'm trying run simple external table program using oracle 11g on linux vm. problem can't query data .txt files.
here's code:

    conn / sysdba;      create or replace directory dir1 'home/oracle/temp/x/';     grant read, write on directory dir1 user;      conn user/password;      create table gerada     (         field1   int,         field2   varchar2(20)     )     organization external     (             type oracle_loader             default directory dir1             access parameters              (                     records delimited newline                     fields terminated ';'                     missing field values null             )             location ('registros.txt')     )     reject limit unlimited;      --error starts here.     select * gerada;      drop table gerada;      drop directory dir1; 

here's error message:

error @ line 1:
ora-29913: error in executing odciexttableopen callout
ora-29400: data cartridge error
error opening file home/oracle/temp/x/gerada_3375.log

and thats how registros.txt looks like:

    1234;hello world; 

i've checked permissions on dir1 , have read/write permissions.

any ideas?

ora-29913 , ora-29400 mean you're unable access directory and/or file.

looking @ create directory command looks path you're using may mis-formatted. try putting forward slash @ start of path , removing 1 @ end of path when creating directory - e.g. create or replace directory dir1 '/home/oracle/temp/x';.

share , enjoy.


Comments