RelationalDBDesignRelationalDBDesign


Security Roles   «Prev 

DBA Using roles

  1. 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.
  2. 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.
  3. 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.
  4. To remove this privilege, reassign the BIDDER role to the user with the SET ROLE SQL command and press Enter.
  5. To check the result of this command, query the SESSION_ROLES view again and press Enter.
  6. Now try to query the COIN.BID table again.
  7. 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.