oracle11g - Oracle 11G, external tables and .csv file -
having issue external tables in oracle 11g. i'm using db artisan run query. create , organization code executes successfully, when run select statement getting error. .csv file set same way layout external_table header such.
create table external_table ( col1 number(14), col2 varchar2(10), col3 varchar2(3), col4 varchar2(3), col4 varchar2(4), col6 number(4,0), col7 varchar2(20), col8 varchar2(20), col9 number(3) ) organization external ( type oracle_loader default directory folder1 access parameters ( records delimited newline fields terminated ',' missing field values null (col1 char(14), col2 char(10), col3 char(3), col4 char(3), col4 char(4), col6 char(4), col7 char(20), col8 char(20), col9 char(3) ) ) location ('filename.csv') --name of flat file. ) reject limit 0;
running:
select * external_table
gives error:
ora-29913:error in executing odciexttableopen callout ora-29400:data cartridge error kup-04027:file name check failed: a:\job\job\filename_1234_5566.log
kup-04027:file name check failed
means file location not valid.
so, given file name ...
a:\job\job\filename_1234_5566.log
... several thoughts occur:
- as @jonearles points out, a: traditionally reserved floppy disk drive. database server (i.e. machine hosts database) have a: drive? if not should correct that.
- does drive really have root directory called
job
sub-directory calledjob
? or typo in path of directory objectfolder1
? - also, sample code gives file name 'filename.csv'. doesn't match file name in error message. specify file name in external table definition?
- the exact causes of
kup-04027
specific operating system, because file naming conventions peculiar each os. guess database resides on remote unix server you're trying read file local windows pc. if scenario won't work: you'll need upload file database server.
Comments
Post a Comment