Database Reference
In-Depth Information
Let's say that you want PRINCE to be allowed to use the MUSIC appli-
cation. In addition, PRINCE will be allowed to grant the role to other
users. Grant the appropriate role to PRINCE using this command:
GRANT MUSIC_ACCESS TO PRINCE WITH ADMIN OPTION;
Granting a role to a user has the same syntax as granting system privi-
leges; therefore, you use the WITH ADMIN OPTION when you want the
user to be able to grant the role to others.
We also decide that the MINIDBA role should have all privileges
granted to the MUSIC_ACCESS role in addition to the system privileges
already granted to it. Grant the MUSIC_ACCESS role to the MINIDBA
role.
GRANT MUSIC_ACCESS TO MINIDBA;
Now, grant the MINIDBA role to ARIEL.
GRANT MINIDBA TO ARIEL;
ARIEL has all privileges from both roles.
Connect to PRINCE.
CONNECT PRINCE/CHARMING@OLTP;
PRINCE is allowed to grant the MUSIC_ACCESS role. He grants it to
ARIEL.
GRANT MUSIC_ACCESS TO ARIEL;
After doing this, we realize that ARIEL already has the
MUSIC_ACCESS role because it is included in the MINIDBA role. So
PRINCE can revoke the redundant role.
REVOKE MUSIC_ACCESS FROM ARIEL;
Search WWH ::




Custom Search