Skip Headers
Oracle® Database SQL Language Reference
11g Release 1 (11.1)

Part Number B28286-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

ALTER ROLE

Purpose

Use the ALTER ROLE statement to change the authorization needed to enable a role.

See Also:

  • CREATE ROLE for information on creating a role

  • SET ROLE for information on enabling or disabling a role for your session

Prerequisites

You must either have been granted the role with the ADMIN OPTION or have ALTER ANY ROLE system privilege.

Before you alter a role to IDENTIFIED GLOBALLY, you must:

The one exception to this rule is that you should not revoke the role from the user who is currently altering the role.

Syntax

alter_role::=

Description of alter_role.gif follows
Description of the illustration alter_role.gif

Semantics

The keywords, parameters, and clauses in the ALTER ROLE statement all have the same meaning as in the CREATE ROLE statement.

Notes on Altering a Role The following notes apply when altering a role:

For more information, refer to CREATE ROLE and to the examples that follow.

Examples

Changing Role Identification: Example The following statement changes the role warehouse_user (created in "Creating a Role: Example") to NOT IDENTIFIED:

ALTER ROLE warehouse_user NOT IDENTIFIED;

Changing a Role Password: Example This statement changes the password on the dw_manager role (created in "Creating a Role: Example") to data:

ALTER ROLE dw_manager 
   IDENTIFIED BY data; 

Users granted the dw_manager role must subsequently enter the new password data to enable the role.

Application Roles: Example The following example changes the dw_manager role to an application role using the hr.admin package:

ALTER ROLE dw_manager IDENTIFIED USING hr.admin;