I am using v_fileHandle := UTL_FILE.FOPEN (v_file_path ,v_file_name, 'w'); and the file is created but when I use UTL_FILE.PUT_LINE(v_fileHandle,v_file_text); nothing is written to the file and there is text in v_file_text. This happens in the stored procedure but when run in sql developer as a anonymous block it does write to the file. I am also using UTL_SMTP to send an email and that runs in the anonymous block but not when calling the stored procedure.