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!

How to create UTL file from on Unix server

206851Jan 31 2005 — edited Aug 2 2005
Hi,

I have created a stored procedure in Oracle (8.0.6) which will create a flat file using UTL_File. The oracle server is running on unix system.

When I am executing the PL/SQL procedure from Unix's Sql Plus, it is creating the file properly. When I try to execute the same from a windows client using SQL Plus / PLSQL Developer, It is not creating the file.

Any input is worh.

also, pls find below the code I am using.

P_Dir = ' /apps/ullcis/dev/data'
P_File = 'test.log'

dbms_output.put_line('In Create Log File ');
l_file_handle := UTL_FILE.FOPEN(P_Dir,P_File, 'w');
dbms_output.put_line('Opened in Write');

UTL_FILE.PUT_LINE (l_file_handle,'sample text');
UTL_File.fflush(l_file_handle);
UTL_FILE.FCLOSE (l_file_handle);

Regards
Sam
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 30 2005
Added on Jan 31 2005
5 comments
722 views