The ALTER USER statement alters the properties assigned to a user.
<alter_user_statement>
::= ALTER USER <user_name> [<user_mode>]
[TIMEOUT <unsigned_integer> | TIMEOUT NULL]
[COSTWARNING <unsigned_integer> | COSTWARNING NULL]
[COSTLIMIT <unsigned_integer> | COSTLIMIT NULL]
[DEFAULT ROLE ALL [EXCEPT <role_name>] | DEFAULT ROLE NONE
| DEFAULT ROLE <role_name> [IDENTIFIED BY <password>]]
[[NOT] EXCLUSIVE] [DEFAULTCODE <ASCII | UNICODE>]
user_name, user_mode, unsigned_integer, role_name, password
At least one of the optional clauses must be specified.
The specified user name must identify a defined user, who is not a member of a user group.
The current user must have owner authorization over the user whose properties are to be altered.
The specified user must not be logged onto the database system when the ALTER USER statement is executed.
· DBA: specifies that the user is to be assigned the user class DBA. This user class can only be granted by the SYSDBA.
· RESOURCE: specifies that the user is to be assigned the user class RESOURCE. If the user was previously assigned to the user class DBA, owner authorization for all users he or she created is revoked. The SYSDBA user then becomes the new owner.
· STANDARD: specifies that the user is removed from the current user class and loses the right to create base tables. All the base tables created by the user are dropped.
· No user class: if no user class is specified, the user class remains unchanged.
If the NULL value is specified, the value defined previously is cancelled.
DEFAULT ROLE defines which of the roles assigned to the user is activated automatically when a database session is opened.
· ALL: all the roles assigned to the user are activated when a session is opened. EXCEPT can be used to exclude specified roles from activation.
· NONE: none of the roles is activated when a user database session is opened.
· Role name specified: the roles specified here must exist and be assigned to the user. They are automatically activated when a user database session is opened.
See also:
For a description of TIMEOUT, COSTWARNING, COSTLIMIT, [NOT] EXCLUSIVE, and DEFAULTCODE, see CREATE USER statement.