Skip to content
Home » Oracle » How to Resolve ORA-02224: EXECUTE privilege not allowed for tables

How to Resolve ORA-02224: EXECUTE privilege not allowed for tables

ORA-02224

When we tried to grant some object privilege to an user, it failed with ORA-02224.

SQL> grant write on hr.employees to oe;
grant write on hr.employees to oe
                  *
ERROR at line 1:
ORA-02224: EXECUTE privilege not allowed for tables

ORA-02224 means that the object privilege you specified in the GRANT statement is not applicable for tables. In this case, the object privilege WRITE is a valid object privilege, but it cannot apply to tables.

A list for all valid object privileges categorized by database objects can be found at the official documentation.

Solution

In fact, there're only 9 object privileges that are valid and can apply to tables.

  • ALTER
  • DEBUG
  • DELETE
  • INDEX
  • INSERT
  • READ
  • REFERENCES
  • SELECT
  • UPDATE

To make the user have the ability to modify the table, we need to grant INSERT, DELETE and UPDATE object privileges.

SQL> grant select, insert, delete, update on hr.employees to oe;

Grant succeeded.

We solved it.

To know more about granting privileges correctly and properly, please follow the link and have a look.

Leave a Reply

Your email address will not be published. Required fields are marked *