Wednesday, July 02, 2008

ORA-22929: invalid or missing directory name and ORA-06564: object Xyz does not exist

Always check out the original article at http://www.oraclequirks.com for latest comments, fixes and updates.

You can see this error when executing a command like:

ALTER TABLE IMP_BAD_BOXES
DEFAULT DIRECTORY 'IMPORT_DIR';

ORA-22929: invalid or missing directory name
The problem is in the single quotes surrounding the directory object name.
The same error is also returned when using a CREATE TABLE statement.

The correct syntax requires either double quotes for case sensitive names or no quotes at all for case insensitive names.
ALTER TABLE IMP_BAD_BOXES
DEFAULT DIRECTORY "Import_Dir";
or
ALTER TABLE IMP_BAD_BOXES
DEFAULT DIRECTORY import_dir;
The last statement is equivalent to :

ALTER TABLE IMP_BAD_BOXES
DEFAULT DIRECTORY "IMPORT_DIR";
Note that when using case sensitive names, if you mistype the name you'll get:
ORA-06564: object Import_Dir does not exist

See message translations for ORA-22929, ORA-06564 and search additional resources.

2 comments:

Anonymous said...

I got this error message when trying to create a directory. Obviously makes no sense: of course the directory doesn't exist, because I'm trying to make it.

The issue was that the name I was providing for the file was 2016_06. It doesn't seem to be happy with names that start with numbers. As soon as I changed it to DP_2016_06, it took it without complaint.

Anonymous said...

Thanks. You're correct about the directory not beginning with numbers. Misleading error message.

yes you can!

Two great ways to help us out with a minimal effort. Click on the Google Plus +1 button above or...
We appreciate your support!

latest articles