Entering content frame

ALTER USER Statement (alter_user_statement) Locate the document in its SAP Library structure

The ALTER USER statement (alter_user_statement) changes the properties assigned to a database user.

Syntax

<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>]
  [[NOT] EXCLUSIVE]
  [DEFAULTCODE ASCII | DEFAULTCODE UNICODE]

<user_mode> ::= DBA | RESOURCE | STANDARD

Explanation

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 changed.

When the ALTER USER statement is executed, the specified user must not be logged on to the database system.

Database User Class (user_mode)

·        DBA: Specifies that the database user is to be assigned the database user class DBA. This database user class can only be granted by the database system administrator (SYSDBA).

·        RESOURCE: Specifies that the database user is to be assigned the database user class RESOURCE. If the user was previously assigned to the database user class DBA, owner authorization for all users he or she created is revoked. The database system administrator (SYSDBA) then becomes the new owner.

·        STANDARD: Specifies that the database user is removed from the current database user class and loses the right to create base tables.  All existing base tables for this user are deleted.

·        No Database User Class: If a database user class has not been specified, the user class of the database user remains unchanged.

NULL

If the value NULL is specified, the previously defined value is cancelled.

DEFAULT ROLE

DEFAULT ROLE defines which of the roles assigned to the user is automatically activated 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 being activated.

·        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.

Note

For a description of TIMEOUT, COSTWARNING, COSTLIMIT, [NOT] EXCLUSIVE and DEFAULTCODE, see CREATE USER statement.

 

Leaving content frame