ALTER USER IDENTIFIED BY allows DBAs or users to change an Oracle database user’s password immediately.
Run ALTER USER user_name IDENTIFIED BY new_password;
in SQL*Plus or any SQL editor. Commit is not required; the change is effective as soon as the statement succeeds.
Connect with your current credentials and execute ALTER USER CURRENT_USER IDENTIFIED BY new_password;
. Oracle resolves CURRENT_USER
to the connected user.
A user can alter only their own password. To change another user’s password, grant ALTER USER
system privilege or grant DBA
role.
Yes. Append PASSWORD EXPIRE
to the command: ALTER USER alice IDENTIFIED BY Temp#2024 PASSWORD EXPIRE;
. The user must pick a new password at first login.
Set the profile while changing the password: ALTER USER alice IDENTIFIED BY Strong#45 PROFILE secure_profile;
. Password complexity and reuse rules come from the profile.
Use long, random phrases or a password generator. Rotate service-account passwords on a schedule. Store secrets in a vault, not application code. Always apply a password profile that enforces complexity, reuse, and lockout rules.
Omitting quotes for special characters: Enclose passwords with symbols in double quotes. Correct: "S@mple#2024"
.
Changing password while sessions remain open: Active sessions stay valid. Terminate old sessions with ALTER SYSTEM KILL SESSION
if immediate cutoff is required.
Service account ecom_app
reads Customers
, Orders
, and Products
. Rotate its password quarterly:
ALTER USER ecom_app IDENTIFIED BY "Q1#2024$Ecom";
Update connection strings in the application secrets manager immediately after running the command.
No. Existing sessions remain valid until they reconnect. Use ALTER SYSTEM KILL SESSION
to disconnect them.
Oracle Job Scheduler can run PL/SQL that executes ALTER USER ... IDENTIFIED BY ...
on a schedule, but external secret rotation tools are preferred.