Home » Developer & Programmer » Data Integration » Read File (Oracle EBS, R12.0.0.6, Windows)
Read File [message #661337] Wed, 15 March 2017 08:13 Go to previous message
Mraouf
Messages: 14
Registered: June 2016
Location: Egypt
Junior Member
--CREATE or replace DIRECTORY USER_DIR AS 'D:\Reading_File';
CREATE or replace DIRECTORY USER_DIR AS '/ora/oracle/';
GRANT READ ON DIRECTORY USER_DIR TO PUBLIC;
--GRANT read, write ON DIRECTORY USER_DIR TO Public ;

DECLARE
V1 VARCHAR2(200); --32767
F1 UTL_FILE.FILE_TYPE;
BEGIN
F1 := UTL_FILE.FOPEN('USER_DIR','TEST.txt','R');
Loop
BEGIN
UTL_FILE.GET_LINE(F1,V1);
dbms_output.put_line(V1);
EXCEPTION WHEN No_Data_Found THEN EXIT; END;
end loop;

IF UTL_FILE.IS_OPEN(F1) THEN
dbms_output.put_line('File is Open');
end if;

UTL_FILE.FCLOSE(F1);
END;


it gives an error >>

ERROR at line 1:
ORA-29283: invalid file operation
ORA-06512: at "SYS.UTL_FILE", line 449
ORA-29283: invalid file operation
ORA-06512: at line 6


Please help
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Oracle EBS integration with CRM
Next Topic: Save Query results into text file
Goto Forum:
  


Current Time: Thu Apr 25 07:15:34 CDT 2024