How to update user’s password with the same password

If you don’t know the user’s password that had been saved in TOAD or SQL DEVELOPER and will expire soon. You can update as it is. In Oracle 11g, the output of the following code set the same password for a particular user.

SELECT 'ALTER USER '|| name ||' IDENTIFIED BY VALUES '''|| spare4 ||';'|| password ||''';' FROM sys.user$ WHERE name='USERNAME';

Besides, you can use the following code in order to unlock the user.

ALTER USER username ACCOUNT UNLOCK;
Posted in DBA
Leave a Reply

Your email address will not be published. Required fields are marked *