using Oracle 10g,
when I am running the procedure, it is not creating the data file in the target directory ,instead i am getting the
DBD::Oracle::st execute failed: ORA-20001: ORACLE ERROR: ORA-20102: Invalid Operation
and also,I created the TEST_TEMP using create directory script
and the file name is given with all access and still ,it is not creating the file in the target directory
and the same script,if I run from TEST or Prod,it is creating the file with out any problem
could you pls let me know if i am missing any settings
PROCEDURE EXTRACTFILE(in_filename IN VARCHAR2) AS
vDir VARCHAR2(50) := 'TEST_TEMP';
BEGIN
file_io.open_write(vDir,in_filename);
FOR x IN
(SELECT item,
SOURCE,
DEST,
qty
FROM product ) LOOP
file_io.write_buf(
x.item || ';' ||
x.SOURCE || ';' ||
x.dest || ';' ||
x.qty );
END LOOP;
file_io.close_file;
commit;
EXCEPTION
WHEN OTHERS THEN
Proc_Stat_Util.Write_Bad_Msg( 'ORACLE ERROR: '||DBMS_UTILITY.FORMAT_ERROR_STACK );
COMMIT;
RAISE_APPLICATION_ERROR(-20001,'ORACLE ERROR: '||DBMS_UTILITY.FORMAT_ERROR_STACK );
END;