Problem solve Get help with specific problems with your technologies, process and projects.

Read, process and write a text file to the database

I want to read a csv/text file, process it and write to database file. What is the best of way doing it?
There is an Oracle built UTL_FILE package that allows PL/SQL program unit to interact (read and write) with the file system. The file system must be located on the same machine as the server or accessible through some sort of drive mapping.There are security and privilege issues that need to be considered. First of all the operating system user (more than likely Oracle) that owns all Oracle Processes must have read and write privileges on the directory your csv file resides in. Secondly the parameter in init<dB_SID>.ora file must have the UTL_FILE_DIR parameter set to include the directory where the csv file resides. An alternate method will be to use wild card character to make all directory fair target for UTL_FILE package.
This was last published in April 2005

Dig Deeper on Using Oracle PL-SQL

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.