Home » SQL & PL/SQL » SQL & PL/SQL » UTL_FILE (oracle 10g, windows 7)
UTL_FILE [message #589762] Wed, 10 July 2013 10:16 Go to next message
gowthamsanj
Messages: 18
Registered: June 2013
Location: tirupur
Junior Member
I create a folder in D drive and name it as mydir

create directory mydir as 'd:/mydir';

directory created

grant read,write on mydir to public;

ERROR at line 1:
ORA-00942: table or view does not exist

when i select 'show parameter utl_fil_dir'

it shows

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
utl_file_dir string


how to overcome this error!

Thank you
Re: UTL_FILE [message #589763 is a reply to message #589762] Wed, 10 July 2013 10:27 Go to previous messageGo to next message
BlackSwan
Messages: 22789
Registered: January 2009
Senior Member
Please read and follow the forum guidelines, to enable us to help you:

http://www.orafaq.com/forum/t/88153/0/

did you start a new session after the GRANT was issued?

I don't know what you have.
I don't know what you do.
I don't know what you see.
It is really, Really, REALLY difficult to fix a problem that can not be seen.
use COPY & PASTE so we can see what you do & how Oracle responds.

Re: UTL_FILE [message #589769 is a reply to message #589762] Wed, 10 July 2013 11:00 Go to previous messageGo to next message
Michel Cadot
Messages: 59136
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Just a look at the documentation prevents from syntax error: GRANT.

Regards
Michel
Re: UTL_FILE [message #589770 is a reply to message #589769] Wed, 10 July 2013 11:18 Go to previous messageGo to next message
mikomi
Messages: 33
Registered: July 2013
Member
Quote:
In the past, accessible directories for the UTL_FILE functions were specified in the initialization file using the UTL_FILE_DIR parameter. However, UTL_FILE_DIR access is no longer recommended. Oracle recommends that you instead use the directory object feature, which replaces UTL_FILE_DIR.

http://docs.oracle.com/cd/B28359_01/appdev.111/b28419/u_file.htm


create or replace directory mydir as 'C:\Path\To\Directory';
/
show errors

select * from all_directories;


HTH.
Re: UTL_FILE [message #589775 is a reply to message #589770] Wed, 10 July 2013 12:16 Go to previous messageGo to next message
Solomon Yakobson
Messages: 2028
Registered: January 2010
Senior Member
And what are you trying to say? What it has to do with OP's issue. Meditate over:

grant read,write on mydir to public;

and

grant read,write on directory mydir to public;


SY.
Re: UTL_FILE [message #589779 is a reply to message #589775] Wed, 10 July 2013 12:24 Go to previous messageGo to next message
Michel Cadot
Messages: 59136
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
If I posted a link to the documentation, there may be a reason? maybe...

Regards
Michel
Re: UTL_FILE [message #589812 is a reply to message #589779] Thu, 11 July 2013 01:32 Go to previous messageGo to next message
gowthamsanj
Messages: 18
Registered: June 2013
Location: tirupur
Junior Member
Ok Michel
Re: UTL_FILE [message #589814 is a reply to message #589812] Thu, 11 July 2013 01:35 Go to previous message
gowthamsanj
Messages: 18
Registered: June 2013
Location: tirupur
Junior Member
Solomon yokobson --- its working perfectly, i fail to give the directory keyword on the grant statement, thanks a lot
Previous Topic: Oracle 11g,sql developer
Next Topic: RECORDs --> %ROWTYPE
Goto Forum:
  


Current Time: Thu Sep 18 14:46:13 CDT 2014

Total time taken to generate the page: 0.11751 seconds