Home » RDBMS Server » Server Administration » Read text file on server. (win xp, oracle 10G R2)
Read text file on server. [message #436095] Mon, 21 December 2009 08:33 Go to next message
Messages: 34
Registered: September 2009


What I have:

1. Machine with win xp and Oracle 10g r2 installed.
2. Text file on that machine. (e.g. in C:\2.txt).
3. DB on that machine.
4. I am located on remote machine, can only query sqlplus or smthg like that.

What I need:
1. Read all text from that file.
2. Get that text using some "select _____ from _____".

Any thoughts?
Thank you.
Re: Read text file on server. [message #436096 is a reply to message #436095] Mon, 21 December 2009 08:38 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10672
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
Use external tables to load the file
UTL_FILE to load it with pl/sql.
In either case, you need certain DBA privs to create the external directory.
Search forum/google for more details.
Re: Read text file on server. [message #436098 is a reply to message #436095] Mon, 21 December 2009 08:45 Go to previous message
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
Create a Directory object pointing at the location of the file.
Grant Read on that directory to your user.
Use Utl_File to access the contents of the file.
Previous Topic: how can I get the redo log of one session
Next Topic: ORA-12154: error
Goto Forum:

Current Time: Wed Oct 26 10:20:44 CDT 2016

Total time taken to generate the page: 0.07925 seconds