10.2 Alter End User
Use the ALTER END USER command to modify the properties of
an existing local end user.
You can use this command to update the password, schema association, account validity period, profile assignment, and account lock status.
A local end user can change their own password using the ALTER
END USER command. When the user does not hold the ALTER END
USER system privilege, they must provide the old password. A local end
user can also use the PASSWORD command to change their
password.
Required privilege
The ALTER END USER system privilege, except when a local
end user is changing their own password.
Syntax
ALTER END USER [ IF EXISTS ] end_user
[ IDENTIFIED BY password [ REPLACE old_password ] ]
[ PROFILE profile ]
[ PASSWORD EXPIRE ]
[ ACCOUNT { LOCK | UNLOCK } ]
[ { SCHEMA schema | NO SCHEMA } ]
[ { START TIME timestamp | NO START TIME } ]
[ { END TIME timestamp | NO END TIME } ];
Parameters
| Parameter | Description |
|---|---|
|
|
The name of the end user to be altered. |
|
|
The new password. If not specified, the current password remains unchanged. |
|
|
The old password. Required when a local end user
who does not hold the |
|
|
The new profile to assign. If not specified, the current profile is retained. |
|
|
A setting that expires the current password, forcing a reset at next login. |
|
|
A setting that locks the account and disables access. |
|
|
A setting that unlocks the account and enables access. |
|
|
A setting that associates the end user with the specified database schema. If not specified, the current association is retained. |
|
|
A setting that removes the current schema association. |
|
|
A setting that sets or replaces the account
effective time stamp ( |
|
|
A setting that removes the configured start time. |
|
|
A setting that sets or replaces the account
expiry time stamp ( |
|
|
A setting that removes the configured end time. |
Usage notes and restrictions
- When
IF EXISTSis specified:- If the end user does not exist, the statement is a no-op. No error is raised.
- If the end user exists, it is altered.
- When
IF EXISTSis omitted:- If the end user does not exist, an error is raised.
- If the end user exists, it is altered.
- An end user who holds the
ALTER END USERprivilege can change passwords for other end users without providing the old password. If an incorrect old password is provided, the change still succeeds.
For syntax diagrams and additional details, see ALTER END USER in Oracle AI Database SQL Language Reference.
Example 10-2 Unlock account
Unlock the account for end user Emma and associate her with the HR schema.
ALTER END USER emma ACCOUNT UNLOCK SCHEMA hr;