| Oracle8i SQL Reference Release 3 (8.1.7) Part Number A85397-01 |
|
SQL Statements:
CREATE CLUSTER to CREATE SEQUENCE, 22 of 25
Use the CREATE ROLE statement to create a role, which is a set of privileges that can be granted to users or to other roles. You can use roles to administer database privileges. You can add privileges to a role and then grant the role to a user. The user can then enable the role and exercise the privileges granted by the role.
A role contains all privileges granted to the role and all privileges of other roles granted to it. A new role is initially empty. You add privileges to a role with the GRANT statement.
When you create a role that is NOT IDENTIFIED or is IDENTIFIED EXTERNALLY or BY password, Oracle grants you the role with ADMIN OPTION. However, when you create a role IDENTIFIED GLOBALLY, Oracle does not grant you the role.
|
See Also:
|
You must have CREATE ROLE system privilege.
role
Specify the name of the role to be created. Oracle recommends that the role contain at least one single-byte character regardless of whether the database character set also contains multibyte characters.
Some roles are defined by SQL scripts provided on your distribution media.
NOT IDENTIFIED
Specify NOT IDENTIFIED to indicate that this role is authorized by the database and that no password is required to enable the role.
IDENTIFIED
Use the IDENTIFIED clause to indicate that a user must be authorized by the specified method before the role is enabled with the SET ROLE statement:
If you omit both the NOT IDENTIFIED clause and the IDENTIFIED clause, the role defaults to NOT IDENTIFIED.
CREATE ROLE Example
The following statement creates global role vendor:
CREATE ROLE vendor IDENTIFIED GLOBALLY;
The following statement creates the role teller:
CREATE ROLE teller IDENTIFIED BY cashflow;
Users who are subsequently granted the teller role must specify the password cashflow to enable the role with the SET ROLE statement.
|
|
![]() Copyright © 1996-2000, Oracle Corporation. All Rights Reserved. |
|