Home » SQL & PL/SQL » SQL & PL/SQL » ora-29283 invalid file operation (oracle database 9i release 2, developer 6i,windows xp sp2)
ora-29283 invalid file operation [message #426709] Mon, 19 October 2009 02:02 Go to next message
lancer26
Messages: 52
Registered: May 2006
Location: Pakistan
Member

hi,
i want to write text file using utl_file..
i m using windows xp sp2 and db 9i release 2.
created directory on dbserver.. \\us01db\USAPS\DTEST
my parameter UTL_FILE_DIR set to *
i created direcory as
CREATE OR REPLACE DIRECTORY
TEST_DIR AS
'\\us01db\USAPS\DTEST';


GRANT READ, WRITE ON DIRECTORY SYS.TEST_DIR TO PITS;

GRANT READ, WRITE ON DIRECTORY SYS.TEST_DIR TO PUBLIC;
i physically read and write option to file.
my code is:
DECLARE
V_HANDLE UTL_FILE.FILE_TYPE;
BEGIN
V_HANDLE := UTL_FILE.FOPEN('TEST_DIR','A.TXT','W');
utl_file .put_line(V_HANDLE, 'NATURE and Beauty');
UTL_FILE.FCLOSE(V_HANDLE);
EXCEPTION
WHEN UTL_FILE.INVALID_PATH THEN
MESSAGE(SQLCODE||SQLERRM);
WHEN UTL_FILE.INVALID_OPERATION THEN
MESSAGE(SQLCODE||SQLERRM);
END;

and then i got following error.ora-29283 invalid file operation.


anyone can help?

Re: ora-29283 invalid file operation [message #426712 is a reply to message #426709] Mon, 19 October 2009 02:05 Go to previous messageGo to next message
ThomasG
Messages: 3186
Registered: April 2005
Location: Heilbronn, Germany
Senior Member
Directories don't work with UNC paths, I believe.

Try using the local (on the server) path. "C:\.." or "D:\.." or whatever your drive is.

[Updated on: Mon, 19 October 2009 02:05]

Report message to a moderator

Re: ora-29283 invalid file operation [message #428801 is a reply to message #426712] Fri, 30 October 2009 02:26 Go to previous message
lancer26
Messages: 52
Registered: May 2006
Location: Pakistan
Member

thanks sir. i got it.
sorry for late response.
Previous Topic: Finding a set
Next Topic: Update using sample(1)
Goto Forum:
  


Current Time: Fri Sep 30 19:18:00 CDT 2016

Total time taken to generate the page: 0.20332 seconds