UTL_FILE_DIR [message #661726] |
Wed, 29 March 2017 20:43 |
reym21
Messages: 241 Registered: February 2010 Location: Philippines
|
Senior Member |
|
|
Gurus,
Good day.
As per Oracle documentation, UTL_FILE_DIR has no default value.
I just want to validate where would be user files, logs, etc. be saved
after granting his/her permission when I didn't create a specific directory
for UTL_FILE_DIR? See commands below:
SQL> grant <permissions> on SYS.UTIL_FILE_DIR to <user>;
Grant succeeded.
SQL> show parameter utl_file_dir
NAME TYPE VALUE
------------------------------------ ----------- ---------------------
utl_file_dir string
SQL> select * from dba_directories;
OWNER DIRECTORY_NAME DIRECTORY_PATH
------------ ------------------------------ -----------------------------------
SYS WORK_DIR /ade/aime_stath10/oracle/work
SYS ORACLE_OCM_CONFIG_DIR /appl1/home/oracle/10.2/ccr/state
SYS DATAPUMP_DIR /VOL03/oradata/DATAPUMP_DIR/
As per my assumption, all said files were saved in his/her default OS
working home directory (e.g. /home/export/<username>). Am I correct?
Thanks in advance.
|
|
|
|
|
|
|
Re: UTL_FILE_DIR [message #661733 is a reply to message #661726] |
Thu, 30 March 2017 01:29 |
John Watson
Messages: 8951 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
You did this,
Quote:SQL> grant <permissions> on SYS.UTIL_FILE_DIR to <user>;
Grant succeeded.
What object type is UTIL_FILE_DIR? Note that he name is not the same UTL_FILE_DIR.
It isn't a directory, because you can't grant privileges on a directory like that.
|
|
|
Re: UTL_FILE_DIR [message #661737 is a reply to message #661733] |
Thu, 30 March 2017 03:12 |
cookiemonster
Messages: 13943 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
Lets clarify a few points:
1) the utl_file_dir parameter and oracle directory objects are only used by the utl_file package, nothing else.
2) The parameter and the directory objects are different ways of doing the same thing - controlling which o/s directories users can access.
3) Even if you have a directory object called utl_file_dir, it still has nothing to do with the parr ameter and you should probably rename it to avoid confusion.
4) There is no way, what so ever, to set either of those up to allow users to write to their own directories by default.
5) The DB itself is running on the server as the user that installed it (normally oracle) - so it has the directory privs of that user, not the user who's currently connected via sqlplus (or whatever else).
|
|
|
|
|
|
|
|
|
Re: UTL_FILE_DIR [message #661746 is a reply to message #661745] |
Thu, 30 March 2017 07:22 |
Bill B
Messages: 1971 Registered: December 2004
|
Senior Member |
|
|
Michel Cadot wrote on Thu, 30 March 2017 05:13
Yes but he said UTIL_FILE and this is a table.
nice catch Michel. I missed that also
|
|
|