Oracle: enable UTL_FILE.PUT_LINE to write output to a file

Today I wanted to log some database output to a text file with UTL_FILE.PUT_LINE but when I called this procedure: CREATE OR REPLACE PROCEDURE writeLog(line varchar2) iS file utl_file.file_type; BEGIN file := utl_file.fopen(‘/tmp’, ‘test.txt’, ‘A’); utl_file.put_line(file, line); utl_file.fflush(file); utl_file.fclose(file); dbms_output.put_line(line); END writeLog; it produced an ORA-29280 error: invalid directory path:…

Weiterlesen…