DBA Using roles
- Start SQL*Plus from the menu choice on your machine. When the login box comes up, enter
BID1
as both the User Name and Password and press Enter.
- Once the SQL*Plus environment starts, enter the command at the
SQL
prompt that lists the current session roles for the user. Make sure you end the command with a semicolon (;) and press the Enter key.
- The current roles assigned to the user
BID1
are listed. These are all default roles. The BROWSER
role gives the SELECT
privilege on the BID
table in the COIN
schema to the user. To test these privileges, select all the columns from the COIN
.BID
table with a SQL
command, ending it with a semi-colon, and press the Enter key.
- To remove this privilege, reassign the
BIDDER
role to the user with the SET ROLE SQL
command and press Enter.
- To check the result of this command, query the
SESSION_ROLES
view again and press Enter.
- Now try to query the
COIN
.BID
table again.
- Without the
SELECT
privilege granted to the BROWSER
role, you can no longer see the data in the COIN
.BID
table. This is the end of the simulation.