Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Why can't I grant execute on a directory?

bentonDec 9 2010 — edited Dec 10 2010
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
This post has been answered by BluShadow on Dec 10 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 7 2011
Added on Dec 9 2010
2 comments
6,215 views