Why can't I grant execute to a directory?
I have carried out the following:
Login as SYS
Prove that the oracle directory exists SELECT * FROM all_directories WHERE directory_name = 'dir_name';
GRANT EXECUTE ON DIRECTORY dir_name TO role_name;
The following documentation at the following address says that I can grant execute:
http://www.morganslibrary.org/reference/directories.html
And yet when I directed the dba to do it and when I query the database to see if He did it it shows me that he did:
GRANTOR GRANTEE TABLE_SCHEMA TABLE_NAME PRIVILEGE GRANTABLE HIERARCHY
------------------------------ ------------------------------ ------------------------------ ------------------------------ ---------------------------------------- --------- ---------
SYSTEM role_name SYS dir_name EXECUTE NO NO
SYSTEM role_name SYS dir_name READ NO NO
SYSTEM role_name SYS dir_name WRITE NO NO
3 rows selected
When I try it in my xe environment it throws the error:
Error starting at line 1 in command:
GRANT EXECUTE ON DIRECTORY dir_name TO role_name
Error report:
SQL Error: ORA-22928: invalid privilege on directories
22928. 00000 - "invalid privilege on directories"
*Cause: An attempt was made to grant or revoke an invalid privilege on a
directory.
*Action: Only CREATE, DELETE, READ and WRITE privileges can be granted or
revoked on directories. Do not grant or revoke other privileges.
What is going on?
Benton