Monday, December 02, 2013

When you Create a Role it is Granted to you Automatically

I noticed recently that, when you create a role, it is automatically granted to you with the admin option. You can see what I mean in the example below, which I tested in Oracle 11.2:
SQL> conn andrew/reid
SQL> create role blah
  2  /
Role created.
SQL> select grantee, admin_option
  2  from dba_role_privs
  3  where granted_role = 'BLAH'
  4  /
GRANTEE                        ADMIN_OPTION
------------------------------ ------------
ANDREW                         YES

18th October 2016:
Checked for relevance.
Shared on LinkedIn.

No comments:

Post a Comment