Wednesday, August 26, 2015

How to change an Oracle password temporarily?

SQL> SELECT a.username, b.password
  FROM dba_users a, sys.user$ b
 WHERE a.username = 'HRPAY' AND a.user_id = b.user#

USERNAME PASSWORD
-------- ----------------
HRPAY 7DD505A0C01598B1

SQL> alter user HRPAY identified by newpassword


Now login with the following credentials: hrpay/ newpassword

After doing your work you can change the password back by using an undocumented feature called "by values"


SQL> alter user scott identified by values '7DD505A0C01598B1';


No comments:

Post a Comment