SQL> shutdown abort .com

About DBA Queries DBA Scripts Quick Guides Nooleus Other Stuff Contact
Andy only 
 

Miscellaneous - utl_file


Create a test procedure
create or replace procedure andy_file_test (
  path       in varchar2,
  filename   in varchar2,
  text  in varchar2
)
is
    output_file  utl_file.file_type;
begin
    output_file := utl_file.fopen (path,filename, 'W');

    utl_file.put_line (output_file, text);

    utl_file.fclose(output_file);
end;
/
Run the procedure
execute andy_file_test('/home/oracle/andy/file_test','andy.txt','hello world');
Copyright© 2007-2010 Andrew Barry