Skip to content
Home » Oracle » How to Resolve ORA-01749: you may not GRANT/REVOKE privileges to/from yourself

How to Resolve ORA-01749: you may not GRANT/REVOKE privileges to/from yourself

ORA-01749

Tried to grant some object privilege to the user, but it failed with ORA-01749.

SQL> show user
USER is "HR"
SQL> grant select on oe.customers to hr;
grant select on oe.customers to hr
                                *
ERROR at line 1:
ORA-01749: you may not GRANT/REVOKE privileges to/from yourself

ORA-01749 means that the grantee can't grant object privileges on other user's object to itself.

Solutions

To do it correctly, you should grant it by a privileged user other than the grantee itself. At least, the privilege user requires GRANT ANY OBJECT PRIVILEGE system privilege.

In this case, we use SYSTEM to do it.

SQL> show user
USER is "SYSTEM"
SQL> grant select on oe.customers to hr;

Grant succeeded.

Problem solved.

Leave a Reply

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