Site icon IT Tutorial

ORA-29280: invalid directory path

I got ” ORA-29280: invalid directory path ”  error in Oracle database.

 

ORA-29280: invalid directory path

 

Details of error are as follows.

 

ORA-29280: invalid directory path

Cause: A corresponding directory object does not exist.

Action: Correct the directory object parameter, or create a corresponding directory object
 with the CREATE DIRECTORY command.


SQL> declare
file_open utl_file.file_type;
begin
file_open:=utl_file.fopen('DUMP_DIR,'exp.par','w');
utl_file.fclose(file_open);
end;
/ 
declare
*
ERROR at line 1:
ORA-29280: invalid directory path
ORA-06512: at "SYS.UTL_FILE", line 41
ORA-06512: at "SYS.UTL_FILE", line 478
ORA-06512: at line 4


 

 

invalid directory path

This ORA-29280 error is related with the corresponding directory object does not exist.

Correct the directory object parameter, or create a corresponding directory object with the CREATE DIRECTORY command.

 

Check the DUMP_DIR and /export/dump directory if these are exist or not. And OS level user has permission to write to this directories. If they don’t exist, create them as follows.

 

$ mkdir -p  /export/dump

SQL> create or replace directory DUMP_DIR as '/export/dump';

Directory created.

 

now try to execute again as follows.

SQL> declare
file_open utl_file.file_type;
begin
file_open:=utl_file.fopen('DUMP_DIR','exp.par','w');
utl_file.fclose(file_open);
end;
/

PL/SQL procedure successfully completed.

 

Do you want to learn Oracle Database for Beginners, then read the following articles.

Oracle Tutorial | Oracle Database Tutorials for Beginners ( Junior Oracle DBA )

 

Exit mobile version