What limitations are there in UTL_FILE?How to create the file using the UTL_FILE option?

Questions by babloo

Showing Answers 1 - 3 of 3 Answers

Krishna Mohan

  • May 12th, 2006

To create a file it is required to initially create a directory..

CREATE DIRECTORY temp AS "/user/test/"

this would create the directory inthe unix box with name temp under the path /user/test.

now using the UTL_FILE.FOPEN we can read or write to a file.


the above command will create a file by name testfile01 under the specified path in Write mode containing each line a max of 50 character.

A max of 50 files can be open simultaneaously and max line size is 50 char these are some of limitations of UTL_FILE

  Was this answer useful?  Yes


  • Feb 5th, 2016

This is not entirely correct. Creating an Oracle directory using CREATE DIRECTORY creates a database object that is used to assign privileges to users against accessing the target location from within the database. It does not actually create the target directory on the OS filesystem. That must be done separately via the OS and the Oracle OS user account must be given the privileges to access the target folder. Think of an Oracle directory database object as a proxy or gatekeeper that enforces read and write access to the OS file location.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.


Related Answered Questions


Related Open Questions