I work with UTL_FILE. I want to create a file in 'C:\pruebaoracle'.
I create a directory with:
create or replace directory test1 as 'C:\pruebaoracle';
grant read, write on test to public;
The procedure is
CREATE OR REPLACE PROCEDURE PRUEBAFICHEROTRAZA AS
F1 UTL_FILE.FILE_TYPE;
BEGIN
F1 := UTL_FILE.FOPEN('test1','prueba.tmp','w');
UTL_FILE.put_line(F1,'Start processing file at : ' || systimestamp);
UTL_FILE.put_line(F1,'End processing file at :'||systimestamp);
-- Close file
UTL_FILE.FCLOSE(F1);
END PRUEBAFICHEROTRAZA;
When I execute the procedure I get the error:
ORA-29280: invalid directory path
How can I create the file?