Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

UTL_FILE Package Help 1

Status
Not open for further replies.

Sridharan

Technical User
Dec 3, 2001
523
IN
Hi,

Is it possible to write a file using UTL_FILE package into my local directory (one on my desktop) and not to the directory where the oracle is running coz I don't know the directories available for writing in the server which are supposed to be in INIT.ORA.


TIA
Sri
 

Nope, there is no way that can be done using UTL_FILE package. But you can check the v$parameter view for the value of utl_file_dir.
Robbie

"The rule is, not to besiege walled cities if it can possibly be avoided" -- Art of War
 
You may share your local directories. You should launch Oracle under account that has access to them. Regards, Dima
 
Robbie,

Is the view name v$parameter or something else. When I give select * from v$parameter it is giving an error. Can you tell me the exact name of the view from which I can get the value of UTL_FILE_DIR????

Thanks
Sri
 
The name is definitely v$parameter (a PUBLIC synonym for sys.v$parameter), but I suppose you're not permited to select from it. Regards, Dima
 
The query to see the definition of UTL_FILE_DIR would be

SELECT value
FROM v$parameter
WHERE name = 'utl_file_dir';

However the user executing this query must have SELECT access to the view (the view belongs to SYS).

As Dima states above, you can write to a local (client) folder with UTL_FILE, but only if the folder is shared, the Oracle database service is logging in as a network user who has access to your shared folder, AND THE FOLDER IS LISTED IN THE UTL_FILE_DIR PARAMETER of the oracle parameter file (using UNC notation).

I am not sure about this, but isn't there a UTL_CLIENT package or something like that which comes with Oracle Developer which allows you to write to a client file? I don't use Oracle Developer so I am not sure, but I think I have seen references to this package.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top