OracleBrains.Com header image 2

Using UTL_FILE after Oracle 9i Release 2

December 25th, 2006 by Rajender Singh · 1 Comment

Before Oracle 9i Release 2, if we want to use the UTL_FILE package then we need to initialize UTL_FILE_DIR initialization parameter and restart the instance.

UTL_FILE_DIR = directory name with path

Note: The parameter specification UTL_FILE_DIR = * has a special meaning. This entry turns off directory access checking, and it makes any directory accessible to the UTL_FILE functions.

Not only was this, security wise there was no mechanism to protect these directories. All the users can access all the directories.

With the Oracle 9i Release 2, things have changed.

Now Instead of using the directory defined with UTL_FILE_DIR, we can create DIRECTORY schema object and use this object with UTL_FILE. Once this is done we can give rights on it to users based on our security policies.

 

 

CREATE OR REPLACE DIRECTORY directory object name AS directory name with path;

GRANT READ, WRITE ON DIRECTORY directory object name TO user;

 


Tags: Oracle Administration · Oracle Database

1 response so far ↓

  • 1 shahid // Apr 17, 2008 at 7:09 pm

    utl_file concept,
    any new function

Leave a Comment