A directory object is an
objects that refers to a directory in the file system on the server (computer) where the
instance is running. The referred to directory does not have necessarily to exist (but if it doesn't, such a directory object is probably useless).
ORA-00990
SQL> grant create directory to rene;
Instead, create any directory
(and possibly drop any directory
) must be granted:
SQL> grant create any directory to rene;
The reason there is no create directory
privilege is because a directory is not owned by the user who created it (similarly to the create any context
privilege).
ORA-00942
In order to grant a permission on a directory, the
grant
statement needs to be told that the name is a directory. The following
grant
statement throws
ORA-00942: table or view does not exist (if
ext_files
is not a table or view):
create directory ext_files as '/opt/oracle/ext_files';
grant read on ext_files to rene;
This statement is better:
grant read on directory ext_files to rene;