Sunday, June 21, 2009

Oracle Tips : How to change an Oracle password temporarily

Oracle Tips : How to change an Oracle password temporarily

Example case information :
- Username : TEST

In Oracle it is possible to change a password temporarily.
This can be useful for DBA which act as a different user.

In 9i ,10g
SQL> SELECT USERNAME,PASSWORD FROM DBA_USERS WHERE USERNAME='TEST';

SQL> SELECT USERNAME,PASSWORD FROM SYS.USER$ WHERE USERNAME='TEST';

USERNAME PASSWORD
TEST F894844C34402B67

SQL> ALTER USER TEST IDENTIFIED BY password1234;

Now login with the following credentials: scott/tigerAfter doing your work you can change the password back by using an undocumented feature called "by values"

SQL> ALTER USER TEST IDENTIFIED BY VALUES 'F894844C34402B67';

No comments:

Post a Comment