Click to See Complete Forum and Search --> : External Tables Causing a problem


Anks
04-06-2007, 06:02 AM
Hi
I am with this problem for the last 2 days and any help will be greatly appreciated.
For the background of the problem:
I am working on 9.2.0.1 and Have XP as the OS.
I have to import data from my .net Application into Oracle so am making use of the External Tables Fundamental.

The tasks that I have done are listed below.
1. Create directory external_tables as 'C:\CCM PROJECTS\CCMMC\External_Tables\';

2. create directory external_logs as 'C:\External_logs\';

---FROM THE SYS USER
3. select * from dba_directories;

4. grant read on directory external_tables to discoverer_master;

5. grant write on directory external_logs to discoverer_master;

---FROM THE NORMAL USER(DISCOVERER_MASTER)
create table machine_details
( MachineName VARCHAR2(100),
class VARCHAR2(100),
Property VARCHAR2(100),
Value VARCHAR2(100)
)
ORGANIZATION EXTERNAL
(
TYPE oracle_loader
DEFAULT DIRECTORY EXTERNAL_TABLES
ACCESS PARAMETERS
(
RECORDS DELIMITED BY NEWLINE
NOLOGFILE
NODISCARDFILE
FIELDS
TERMINATED by ","
MISSING FIELD VALUES ARE NULL
REJECT ROWS WITH ALL NULL FIELDS
( MachineName CHAR(100),
Class CHAR(100),
Property CHAR(100),
Value CHAR(100)
)
)
LOCATION('User.csv')
);


select * from machine_details
*
ERROR at line 1:
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-04040: file User.csv in EXTERNAL_TABLES not found
ORA-06512: at "SYS.ORACLE_LOADER", line 14
ORA-06512: at line 1

The file User.csv is in the folder mentioned. I have given the Security Permissions to both the OS folders i. e EXternal_tables and External_logs.The table is created success fully but when I try to retrieve any info I get the above mentioned error.
Also at first when i had explicitly mentioned the Log file path and the Log file name while creating the Table I got the Error that Log file Not found.

Do let me know if something more has to be done on the same.

davey23uk
04-06-2007, 09:53 AM
and that file is on the database server right?

Anks
04-06-2007, 10:12 AM
and that file is on the database server right?
I am using Oracle Client only....The server is else where

Anks
04-06-2007, 10:17 AM
Also to update in this clause:

LOCATION('User.csv')..... I have changed to LOCATION(External_tables:'User.csv') the name of my drectory.... The result is the same.
The hunch that I am having is that there is some problm in Oracle Accessing the Folder...If you can let me know the exact permission that oracle_home secifically that oracle 92 should have on the folder then it should b good.

PAVB
04-06-2007, 08:45 PM
So... let me check my understanding of your predicament.

1-- You have your Oracle RDBMS running on a server, lets say box "A"
2-- You have created your "external table" in your client pc, lets say box "B".
3-- You expect Oracle server to access and read data from your client pc.

Am I right?