Oracle8i SQL Reference Release 2 (8.1.6) A76989-01 |
|
SQL Statements (continued), 4 of 4
To enable and disable roles for your current session. For information on creating roles, see "CREATE ROLE".
When a user logs on, Oracle enables all privileges granted explicitly to the user and all privileges in the user's default roles. During the session, the user or an application can use the SET ROLE
statement any number of times to change the roles currently enabled for the session. The number of roles that can be concurrently enabled is limited by the initialization parameter MAX_ENABLED_ROLES
. For information on changing a user's default roles, see "ALTER USER"
You can see which roles are currently enabled by examining the SESSION_ROLES
data dictionary view.
You must already have been granted the roles that you name in the SET
ROLE
statement.
To enable the role GARDENER
identified by the password MARIGOLDS
for your current session, issue the following statement:
SET ROLE gardener IDENTIFIED BY marigolds;
To enable all roles granted to you for the current session, issue the following statement:
SET ROLE ALL;
To enable all roles granted to you except BANKER
, issue the following statement:
SET ROLE ALL EXCEPT banker;
To disable all roles granted to you for the current session, issue the following statement:
SET ROLE NONE;
|
Copyright © 1999 Oracle Corporation. All Rights Reserved. |
|