Home » SQL & PL/SQL » SQL & PL/SQL » error in utl_file
error in utl_file [message #287467] Wed, 12 December 2007 05:36 Go to next message
ridhi_sundar
Messages: 184
Registered: November 2007
Location: Bangalore
Senior Member
I am using utl_file to print data in to text file from an oracle procedure.the procedure is as below:

CREATE OR REPLACE procedure PRO_OP_PURCHASEORDER
is
output_file utl_file.file_type;
v_trx_date date;
v_order_date date;
v_customer_po_number char(8);

begin
select BEG005,BEG003,sysdate into v_order_date,v_customer_po_number,v_trx_date from IP_purchaseorder_beg where HEADER='BEG';

output_file := utl_file.fopen ('oraload','PO_output.txt', 'W');
utl_file.put_line (output_file, v_order_date);
utl_file.fclose(output_file);


end;
/


I am getting an error as below when i execute the procedure

ORA-29280: invalid directory path
ORA-06512: at "SYS.UTL_FILE", line 18
ORA-06512: at "SYS.UTL_FILE", line 424
ORA-06512: at "APPS.PRO_OP_PURCHASEORDER", line 11
ORA-06512: at line 1

The directory does exist and i have also granted the read write to the directory as

GRANT READ,WRITE ON DIRECTORY oraload TO public;

Wherer is the error and how to recover please help
Re: error in utl_file [message #287470 is a reply to message #287467] Wed, 12 December 2007 05:44 Go to previous message
Michel Cadot
Messages: 64132
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Try ORALOAD in upper case in open function.
Check target directory exist on server and instance owner has access to it.

Regards
Michel

[Updated on: Wed, 12 December 2007 05:44]

Report message to a moderator

Previous Topic: partition
Next Topic: Passing Refcursors
Goto Forum:
  


Current Time: Wed Dec 07 18:50:02 CST 2016

Total time taken to generate the page: 0.08386 seconds