ORA-29280: Invalid Directory Path ORA-06512:”SYS.UTL_FILE”

Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
  • User AvatarANKUSH THAVALI
  • 17 Dec, 2023
  • 0 Comments
  • 1 Min Read

ORA-29280: Invalid Directory Path ORA-06512:”SYS.UTL_FILE”

PROBLEM:

One of our procedure using utl_file to create a file and it is failing with this error.

Solution :

1. Check the dba_directories, whether the directory TESTUSER is present in database or not.
SQL> select * from dba_directories where directory_name='TESTUSER';

no rows selected
2. Create the directory as below:
SQL> create directory TESTUSER as '/export/home/oracle';

Directory created.
3. Retry the operation
SQL> declare
file_open utl_file.file_type;
begin
file_open:=utl_file.fopen('TESTUSER','dbaclassa.txt','w');
utl_file.fclose(file_open);
end;
/ 2 3 4 5 6 7

PL/SQL procedure successfully completed.