Oracle9i SQL Reference
Release 1 (9.0.1)

Part Number A90125-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to beginning of chapter Go to next page

SQL Statements:
ALTER CLUSTER to ALTER SEQUENCE, 16 of 18


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::=


Text description of statements_121.gif follows
Text description of alter_role

Keywords and Parameters

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


Notes:

  • When you alter a role, user sessions in which the role is already enabled are not affected.

  • If you change a role identified by password to an application role (with the USING package clause), password information associated with the role is lost. Oracle will use the new authentication mechanism the next time the role is to be enabled.

  • If you have the ALTER ANY ROLE system privilege and you change a role that is IDENTIFIED GLOBALLY to IDENTIFIED BY password, IDENTIFIED EXTERNALLY, or NOT IDENTIFIED, then Oracle grants you the altered role with the ADMIN OPTION, as it would have if you had created the role identified nonglobally.

 

See Also:

CREATE ROLE 

Examples

The following statement changes the role analyst to IDENTIFIED GLOBALLY:

ALTER ROLE app_user IDENTIFIED GLOBALLY;

This statement changes the password on the teller role to letter:

ALTER ROLE teller 
   IDENTIFIED BY letter; 

Users granted the teller role must subsequently enter the new password "letter" to enable the role.

The following example changes the analyze role to an application role using the hr.admin package:

ALTER ROLE analyst IDENTIFIED USING hr.admin;


Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996-2001, Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback