Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Utl_File not generating file in the server path

msApr 1 2022 — edited Apr 1 2022

Hi All,
I have executed a block of code which generates a simple text file using the utl_file package
with a word 'test' and outputs the file to the location in server.

set serveroutput on
declare
l_file utl_file.file_type;
l_dir varchar2(500):='WMS_IFILEOUT';
l_file_name varchar2(500):='test.txt';
begin
l_file :=utl_file.fopen(l_dir,l_file_name,'w',32767);
utl_file.put_line(l_file,'test123');
utl_file.fclose(l_file);
end;
/

When i run the procedure it compiles successfully but the file is not
generated in the path.
The path and directory are available in the dba_directories
and read and write privileges are available on it.

I noticed that when i print
show parameter utl_file
then no values are displayed alongside to it.

Do I have to set this parameter in order to generate the files in the server path.
If so, can you please tell how to set it.

Thanks

This post has been answered by User_H3J7U on Apr 1 2022
Jump to Answer
Comments
Post Details
Added on Apr 1 2022
3 comments
405 views