title: ORA-29285 error While exporting data from oracle database to CSV file using procedure
body: <p>I have a problem here while exporting data from oracle database to CSV file using a procedure. While exporting data, sometimes the CSV file is getting truncated and the error it shows is "<strong>ORA-29285 - File write error</strong>". The problem here is the file is getting truncated not all the times but randomly.</p>
  
  <p><strong>Edit</strong> : Below is the chunk of code I used in my procedure</p>
  
  <pre><code>conn := utl_file.fopen('sample_directory','output.csv','W',4096);
  for i in (select * from per_data)
  loop
  utl_file.put_line(conn,i.name||','||i.sub||','||to_char(i.start_date,'dd-mon-yy')||','||to_char(i.expire_date,'dd-mon-yy')||','||i.loc||CHR(13));
  end loop;
  utl_file.fclose(conn);`
  </code></pre>
  
  <p>I am pulling my hair to trace out the reason. Can someone help me out ?</p>