Oracle Database User Unlock, Update, and Password Reset
Table of Contents
In this article, explaining how to unlock Oracle database user, update the password, reset the when the password expired.
Unlock the database user
Before going to unlock the database user, you can check the user status by using the following query.
Syntax select username, account_status from dba_users where username = '<db-user-name>'; Example select username, account_status from dba_users where username = 'NARAYANATUTORIAL'; Output
USERNAME | ACCOUNT_STATUS |
NARAYANATUTORIAL | LOCKED |
The username NARAYANATUTORIAL is locked. By using the following query we can unlock the user. Update the password will be done periodically basis
Syntax alter user <Username> account unlock; Example alter user NARAYANATUTORIAL account unlock; Output User altered
Update the database user password
We can update the database password with new password. The update password will be done periodically or before password expired.ora
Syntax alter user <Username> identified by <new password>; Example alter user NARAYANATUTORIAL identified by <new password>; Output User altered
Reset the database user password
We can reset the database user password with the original password. Reset password activity will be done when the password expired.
Syntax alter user <Username> identified by <original password>; Example alter user NARAYANATUTORIAL identified by <original password>; Output User altered
Hello! I am Narayanaswamy founder and admin of narayanatutorial.com. I have been working in the IT industry for more than 12 years. NarayanaTutorial is my web technologies blog. My specialties are Java / J2EE, Spring, Hibernate, Struts, Webservices, PHP, Oracle, MySQL, SQLServer, Web Hosting, Website Development, and IAM(ForgeRock) Specialist
I am a self-learner and passionate about training and writing. I am always trying my best to share my knowledge through my blog.