Purpose
This statement is used to modify the authentication method of a role.
Note
User sessions of the modified role are not affected.
Syntax
ALTER ROLE role_name
{ NOT IDENTIFIED
| IDENTIFIED BY password
} ;
Parameters
| Parameter | Description |
|---|---|
role_name |
The name of the role to be modified. It can be a STRING_VALUE, NAME_OB, or a predefined role name (DBA, RESOURCE, CONNECT, and PUBLIC). |
NOT IDENTIFIED |
Specifies that no authentication method is used when the role is enabled. |
IDENTIFIED BY password |
Specifies the password when the role is enabled. Note A user who is granted this role must specify a password to enable the role by using the SET ROLE statement. |
Examples
Create a role named
role1and modify its authentication method to password-based. The password ispassword1.obclient> CREATE ROLE role1; obclient> ALTER ROLE role1 IDENTIFIED BY password1;Change the password of the
role1role topassword2.obclient> ALTER ROLE role1 IDENTIFIED BY password2;Enable the
role1role without any authentication method.obclient> ALTER ROLE role1 NOT IDENTIFIED;