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:


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

alter user USERNAME identified by values 

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


Post a Comment