Understanding DBA Directory
To create a directory: CREATE OR REPLACE DIRECTORY alias AS 'pathname' ; To Grant: GRANT permission ON DIRECTORY alias TO { user | role | PUBLIC}; SQL > SELECT DIRECTORY_NAME , DIRECTORY_PATH FROM DBA_DIRECTORIES WHERE DIRECTORY_NAME = 'DUMP' ; DIRECTORY_NAME DIRECTORY_PATH ------------------------------ --------------- DUMP / home /appsolworld $ chmod 777 /home/appsolworld Just test run: DECLARE Handle UTL_FILE.FILE_TYPE; BEGIN Handle : = UTL_FILE.FOPEN ( 'DUMP' , 'abc.txt' , 'w' ); UTL_FILE.PUT ( 'This is the first line' ); UTL_FILE.FCLOSE (Handle); EXCEPTION WHEN OTHERS THEN DBMS_OUTPUT.PUT_LINE ( 'Exception: SQLCODE=' || SQLCODE || ' SQLERRM=' || SQLERRM); RAISE; END ; / DBA_DIRECTORIES view which we use to check directory information. Let us describe that. SQL> desc DBA_DIRECTORIES; Name Null?