Cause: A corresponding directory object does not exist.
For some reason i have been postponing the search of the real reasons behind this error message until i finally found some spare time in my busy agenda.
At first it was a bit frustrating because i had two allegedly identical systems running the same software and behaving in two different fashions, that is the ideal scenario for one of those nasty situations that may depend on some factor like "different letter case" or boundary conditions.
In my case it proved to be the latter, being an oracle initialization parameter the culprit.
As you certainly know, starting from version 9, directory objects have been introduced in order to hold information about file system folders in an easily manageable way.
Instead of tampering with the initialization file and the UTL_FILE_DIR parameter, which is almost obsolete, and forces you to bounce the database in case of changes, you can easily handle file system pointers by means of directories.
Now, suppose that in version 10g you want to use an utility like UTL_FILE.FREMOVE, that allows you to delete a file from the file system, provided you have the necessary privileges.
If you set UTL_FILE_DIR to * (or to a specific list of directories) in the spfile, you can still pass the full directory path (e.g. '/tmp/files') as location parameter to FREMOVE.
If UTL_FILE_DIR is not set, the only way to reference a file is by means of a directory object pointing to the folder where the file is located.
In my humble opinion both the description of the cause of error message and the description of the location parameter have not been explained very clearly because they never mention the possibility of getting different results depending on the value of UTL_FILE_DIR.
Clearly it has been made this way in order to keep the software compatible with previous versions of Oracle but, for some reason, it was not so obvious for me.
Updated October 2, 2007
It's worth noting that you can get ORA-29280 also when you supply the directory object name using the wrong letter casing:
create directory test_dir as 'C:\Temp'is not the same as
/
create directory "test_dir" as 'C:\Temp'Indeed the former statement will create a directory object TEST_DIR (uppercase identifier) whereas the latter will create a lowercase one.
/
This has some consequences in the way you specify the directory name in UTL_FILE parameters that are case sensitive and also in the GRANT statements where you must enclose the identifier in double quotes.
Likewise the path content may or may not be case sensitive depending on the platform, i guess that it's case insensitive on Windows and it's case sensitive on Unix, so watch out for the letter casing!
ORA-29280: percorso della directory non valido
ORA-29280: ruta de acceso del directorio no válida
ORA-29280: ruta d'accés del directori no vàlida
ORA-29280: chemin de répertoire non valide
ORA-29280: Ungültiger Verzeichnispfad
ORA-29280: Μη αποδεκτή διαδρομή καταλόγου
ORA-29280: ugyldig katalogsti
ORA-29280: ogiltig katalogsökväg
ORA-29280: ugyldig katalogbane
ORA-29280: virheellinen hakemistopolku
ORA-29280: érvénytelen könyvtárútvonal
ORA-29280: cale de director nevalidă
ORA-29280: Ongeldig directorypad
ORA-29280: caminho de diretório inválido
ORA-29280: percurso do directório inválido
ORA-29280: недопустимый путь доступа к каталогу
ORA-29280: neplatná cesta k adresáři
ORA-29280: neplatná cesta adresára
ORA-29280: niepoprawna ścieżka katalogu
ORA-29280: geçersiz dizin yolu
2 comments:
Hi.
Have you encountered the same error in Oracle Reports 6i? It's funny because I tried creating opening and writing to the file using DIRECTORIES from within a PL/SQL block in SQL*Plus and its doing OK.
But the same functionality is not working with Oracle reports. Any idea why?
hmmm, it must be more or less 5 years since i last used Oracle Reports, so i am not the best person to ask, but Oracle reports version 6i wasn't designed for Oracle 8i?
There was very limited support for directories at that time.
And as far as i know you could not specify a directory name with utl_file at that time, but only in BFILEs, directory objects support started with version 9i if i remember correctly.
What is the architecture of your reports server?
Post a Comment