Home » SQL & PL/SQL » SQL & PL/SQL » Oracle default directory
Oracle default directory [message #376106] Tue, 16 December 2008 01:46 Go to next message
bhangale.parag
Messages: 11
Registered: December 2008
Location: culcutta
Junior Member
hi all,
I am new to oracle 10g database. i have one problem about file.
i want to create file on server i was trying with UTL_FILE but i dont have that previliges so my question is that
"is any default directory of oracle on server so i can access it to create a new flat text file in it??."
Please reply
and thanks in advance
Re: Oracle default directory [message #376115 is a reply to message #376106] Tue, 16 December 2008 02:29 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
No default directory.
You have to ask your DBA to create one and grant you the necessary privileges.

Regards
Michel
Re: Oracle default directory [message #376131 is a reply to message #376115] Tue, 16 December 2008 03:59 Go to previous messageGo to next message
bhangale.parag
Messages: 11
Registered: December 2008
Location: culcutta
Junior Member
thanks for reply
is there any other way so I can create my text file on server????????????????
Re: Oracle default directory [message #376132 is a reply to message #376131] Tue, 16 December 2008 04:10 Go to previous messageGo to next message
ThomasG
Messages: 3189
Registered: April 2005
Location: Heilbronn, Germany
Senior Member
Sure. You can write a shell script that calls sql*plus and then spool the file on the server. Of course then you would probably have to ask somebody else to give you shell access to the server.

If you need to hammer in a nail and you don't want to ask someone for a hammer then you can also use a toothbrush to do it. But it's a suboptimal solution.



Re: Oracle default directory [message #376164 is a reply to message #376106] Tue, 16 December 2008 06:16 Go to previous messageGo to next message
spmano1983
Messages: 269
Registered: September 2007
Senior Member
Check this.

select * from v$parameter where name='utl_file_dir'
Re: Oracle default directory [message #376167 is a reply to message #376164] Tue, 16 December 2008 06:50 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
If you are in 10g, this parameter should not be used.

Regards
Michel
Re: Oracle default directory [message #376172 is a reply to message #376164] Tue, 16 December 2008 07:13 Go to previous messageGo to next message
bhangale.parag
Messages: 11
Registered: December 2008
Location: culcutta
Junior Member
thanks spmano1983,
i got one row with the help of this query but how i get the path of that directory so i can open a new file using UTL_FILE??
if u please get my problem then please reply me................

[Updated on: Tue, 16 December 2008 07:13]

Report message to a moderator

Re: Oracle default directory [message #376177 is a reply to message #376106] Tue, 16 December 2008 07:28 Go to previous messageGo to next message
spmano1983
Messages: 269
Registered: September 2007
Senior Member
Hi,
If you can see any path in the value column then you can use this in your utl_file.

If you are using UNIX it may be /usr/tmp or Windows then c:\temp

Re: Oracle default directory [message #376181 is a reply to message #376177] Tue, 16 December 2008 07:33 Go to previous messageGo to next message
bhangale.parag
Messages: 11
Registered: December 2008
Location: culcutta
Junior Member
thanks spmano1983 for replying,
I have tried with /usr/tmp but it gives me error
"ORA-29280: invalid directory path".........
please reply
And thanks in Advance
Re: Oracle default directory [message #376184 is a reply to message #376106] Tue, 16 December 2008 07:44 Go to previous messageGo to next message
spmano1983
Messages: 269
Registered: September 2007
Senior Member
what path you are getting after you run the query

can you please post the path name??

Otherwise, ask the dba people to give the acess for the folder which you want to use.

[Updated on: Tue, 16 December 2008 07:44]

Report message to a moderator

Re: Oracle default directory [message #376187 is a reply to message #376181] Tue, 16 December 2008 07:53 Go to previous messageGo to next message
joy_division
Messages: 4640
Registered: February 2005
Location: East Coast USA
Senior Member
bhangale.parag wrote on Tue, 16 December 2008 08:33
thanks spmano1983 for replying,
I have tried with /usr/tmp but it gives me error
"ORA-29280: invalid directory path".........



That's because you ignored Michel's answer. In 10g, you do not use UTL_FILE_DIR, you you directory objects created by the CREATE DIRECTORY command that you have been READ access to. Speak to your DBA.
Re: Oracle default directory [message #376188 is a reply to message #376184] Tue, 16 December 2008 07:54 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
As @Michel says - if you're using ORacle 10g, then you really should use the CREATE DIRECTORY command to specify the directories that UTL_FILE can write to.
Re: Oracle default directory [message #376192 is a reply to message #376188] Tue, 16 December 2008 07:58 Go to previous message
bhangale.parag
Messages: 11
Registered: December 2008
Location: culcutta
Junior Member
thanks all of you ,
finally i decided to tell my dba to give me previliges so i can create directory and then create a new file on oracle server.
Thanks all
Previous Topic: How to call in through pl/sql to get result
Next Topic: alter index problem
Goto Forum:
  


Current Time: Sun Dec 04 14:48:51 CST 2016

Total time taken to generate the page: 0.09147 seconds