RENAME USER statement (UNIX, Linux)

Use the RENAME USER statement to change the name of an internal user of a non-root installation of the database server.

This statement is an extension to the ANSI/ISO standard for the SQL language.

Syntax


1  RENAME USER  old_name TO new_name
Element Description Restrictions Syntax
old_name Authorization identifier of a specific user that you are renaming. Must be an existing authorization identifier Owner name
new_name Authorization identifier of a specific user. Cannot be an existing authorization identifier Owner name

Usage

Only a DBSA can run the RENAME USER statement. With a non-root installation, the user who installs the server is the equivalent of the DBSA, unless the user delegates DBSA privileges to a different user.

Do not rename a user while the user is active on a connection. Running the statement does not transfer any database or table level privileges granted to the old user name to the new user name.

Execution of the RENAME USER statement can be audited with the RNUR audit code.

The USERMAPPING configuration parameter must be set to BASIC or ADMIN.

You must also enter values in the SYSUSERMAP table of the sysusers database to map users with the appropriate user properties so that the mapped user statements of SQL to work correctly.

Example

The following statement renames the user bill to bob:

RENAME USER bill TO bob;