Show TOC

RENAME USER Statement (rename_user_statement)Locate this document in the navigation structure


The RENAME USER statement ( rename_user_statement) changes the name of a database user.

  RENAME USER <user_name> TO <new_user_name>



The database user that you want to modify must exist. The user name must identify a database user whose owner is the current user.

The new user name ( new_user_name) must not be identical to the name of an existing database user, user group, schema, or role.

The database user you want to modify must not be logged on to the database system when the RENAME USER statement is executed. This does not apply when the database system administrator changes its name.

When the database system administrator changes its name, then the current transaction is implicitly ended by a COMMIT statement. After the database system administrator has been successfully changed, a COMMIT instruction is implicitly executed.

The database system automatically adapts the objects that are dependent on the database user to be modified to the new user name. This process can be time consuming depending on the number of objects (view tables, tables and so on) which belong to the schema of this user.

More Information

Database Administration, Database Users