Change the properties of a user.
Syntax:
ALTER USER username options; ALTER USER username,… {GRANT|REVOKE} proxy_options; options: IDENTIFIED BY password [REPLACE old_password] IDENTIFIED EXTERNALLY IDENTIFIED GLOBALLY AS external_name DEFAULT TABLESPACE tablespace TEMPORARY TABLESPACE tablespace QUOTA int {K | M} ON tablespace QUOTA UNLIMITED ON tablespace PROFILE profile_name DEFAULT ROLE role [,role,…] DEFAULT ROLE ALL [EXCEPT role,…] DEFAULT ROLE NONE PASSWORD EXPIRE ACCOUNT {LOCK|UNLOCK} proxy_options: CONNECT THROUGH proxy [WITH ROLE role_name,…] [authentication] CONNECT THROUGH proxy [WITH ROLE ALL EXCEPT role_name,…] [authentication] CONNECT THROUGH proxy [WITH NO ROLES] [authentication] authentication: AUTHENTICATED USING PASSWORD AUTHENTICATED USING DISTINGUISHED NAME AUTHENTICATED USING CERTIFICATE [TYPE 'type'] [VERSION 'version']
When setting a password: its length must be between 1 and 30 characters, the first character must be one of A-Z or 0-9. Other password characters can be A-Z (a-z), 0-9, underscore (_), dollar ($) or hash (#).
In Oracle 11g passwords are case sensitive, in older versions passwords are not case sensitive.
The password must not be a reserved word.
"When people tell you how young you look, they
are also telling you how old you are" - Cary
Grant
Examples
SQL> Alter user JDoe identified by passw0rd1;
SQL> Alter user JDoe account lock;
SQL> Alter user JDoe account unlock;
Related Oracle Commands:
CREATE USER
DROP USER
ORA-01017 - Invalid Username/Password
Password generator
Related Views:
USER_PASSWORD_LIMITS SESSION_ROLES SESSION_PRIVS SESSION_CONTEXT DBA_TS_QUOTAS USER_TS_QUOTAS DBA_USERS ALL_USERS USER_USERS V$SESSION V$SESSION_CONNECT_INFO