Home » SQL & PL/SQL » SQL & PL/SQL » UTL_FILE.FOPEN
UTL_FILE.FOPEN [message #271511] Mon, 01 October 2007 16:17 Go to next message
balji_dxb
Messages: 37
Registered: October 2007
Member
I CREATE A DIRECTORY IN SYS AS CREATE OR REPLACE DIRECTORY

EDI_MC AS 'C:\EDI_MC';

GRANT READ,WRITE ON EDI_MC TO PUBLIC;

alter system set utl_file_dir='*' scope=spfile

WHEN I GIVE UTL_FILE.FOPEN('EDI_MC',FILENAME,'W'); in my procedure it gives.
ERROR at line 1:
ORA-29283: invalid file operation
ORA-06512: at "SYS.UTL_FILE", line 449
ORA-29283: invalid file operation

i checked the property of c:\edi_mc properties and full rights is given. What else needs to be done.

Re: UTL_FILE.FOPEN [message #271536 is a reply to message #271511] Mon, 01 October 2007 23:30 Go to previous messageGo to next message
Michel Cadot
Messages: 64121
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Please read and follow OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format. Use the "Preview Message" button.
Please always post your Oracle version (4 decimals).

Copy and paste your SQL*Plus session don't just tell what you did. We want to see it.

NEVER ever use utl_file_dir='*'. Think what '*' means. It means you can erase your data files for instance.

Regards
Michel
Re: UTL_FILE.FOPEN [message #271540 is a reply to message #271536] Mon, 01 October 2007 23:41 Go to previous messageGo to next message
balji_dxb
Messages: 37
Registered: October 2007
Member
Thank you sir,
Without understanding i was creating the folder in my local machine. i tried creating the folder in Database server, then it started working.
Re: UTL_FILE.FOPEN [message #271557 is a reply to message #271540] Tue, 02 October 2007 00:54 Go to previous message
Michel Cadot
Messages: 64121
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Yes, PL/SQL is executed on server and does not know client.

Regards
Michel
Previous Topic: problem with procedure not using defaults when called via dbms job or manually
Next Topic: DBMS_LOB.Instr ORA-06502: PL/SQL: numeric or value error
Goto Forum:
  


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

Total time taken to generate the page: 0.14157 seconds