Thursday, April 17, 2014

ORA-01749

This was tested on an Oracle 11.2 database. You cannot GRANT or REVOKE object privileges to or from yourself:
 
SQL> show user
USER is "ANDREW"
SQL> grant select on blah to john
  2  /
 
Grant succeeded.
 
SQL> grant select on blah to andrew
  2  /
grant select on blah to andrew
                        *
ERROR at line 1:
ORA-01749: you may not GRANT/REVOKE privileges to/from
yourself
 
SQL> revoke select on blah from john
  2  /
 
Revoke succeeded.
 
SQL> revoke select on blah from andrew
  2  /
revoke select on blah from andrew
                           *
ERROR at line 1:
ORA-01749: you may not GRANT/REVOKE privileges to/from
yourself
 
SQL>

No comments:

Post a Comment