Monday, February 27, 2012

Un-expire Oracle User account

There is no real un-expire option for an Oracle user account. Say you have an account that goes into expire status…you have to alter the user using the identified by clause to set the password. Problem is if you do not know the original password you have to change it…this could cause big problems.


However here is a cool workaround to remedy the problem:


First find the user int he sys.user$ table using this query:



select password, spare4 from sys.user$ where name='USERNAME';

You should see some results similar to below:


PASSWORD-1FDF39535EDB8EDD
SPARE4-S:5BEFDD3B650E6910F42EAB51EBDFF612205E92620B56166AF480551F41B6


Now take the results and run the ALTER statement on the user: 


alter user USERNAME identified by values 
'S:5BEFDD3B650E6910F42EAB51EBDFF612205E92620B56166AF480551F41B6;1FDF39535EDB8EDD'; 

You concatenate the password field and the spare4 field with a semicolon in between.

0 comments:

Post a Comment