This discussion is archived
11 Replies Latest reply: Jul 16, 2010 1:23 PM by 666668 RSS

ORA-06564: object XXX_DAT_DIR does not exist

666668 Newbie
Currently Being Moderated
I have an external table definition with the default directory defined as xxx_dat_dir.

...
type oracle_loader
default directory xxx_dat_dir
access parameters
...
I have a .sql script with the following statement in it:

insert into my_table
(select xo.household_id,
lpad(xo.account01,14,'0') account01
from x_table xo);

This has been working without problems for a couple years.

Now, I'm wanting to put wrappers around my data loading scripts, so I created some object types:

create or replace type DataLoader as object (

record_date date,
target_name varchar2(30),

not instantiable member function load_data return number,

final member procedure load_and_log

) not instantiable not final;
/

create or replace type SubLoader under DataLoader (
constructor function SubLoader(self in out nocopy SubLoader, record_date date)
return self as result,

overriding member function load_data return number
);
/

Now, the above insert code is in the SubLoader type body in the load_data() function. When I call the function, I get ORA-06564: object XXX_DAT_DIR does not exist.

Now clearly, it does exist because I can execute the insert within the .sql script without a problem. So, it just seems like it's not accessible within the object type body. or something.

Thanks for your help.

Moira

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points