Reset EXPIRED GRACE to OPEN with same password hash


Quick note on how to reset a user / application user to use the same password.


SQL> select USERNAME ,ACCOUNT_STATUS from dba_users where username like 'NOM_U_BACK';

USERNAME |ACCOUNT_STATUS
-----------|---------------------------
NOM_U_BACK |EXPIRED(GRACE)

Get HASH from NOM_U_BACK ( This is different in 11G ! in 10g you can obtain this from ‘dba_users’ -> ‘password’ column )

SQL> select spare4 from sys.user$ where name= 'NOM_U_BACK';

SPARE4
------------------------------------------------------------------------------------------------------------------------
S:3R63F010262CB759D0859787E89C0831A05841B90B9FD0F3F09A1AECBF06

Alter User :


SQL> alter user NOM_U_BACK identified by values 'S:3R63F010262CB759D0859787E89C0831A05841B90B9FD0F3F09A1AECBF06';

User altered.

Check Status :


SQL> select USERNAME ,ACCOUNT_STATUS from dba_users where username like 'NOM_U_BACK';

USERNAME |ACCOUNT_STATUS
-----------|---------------------------
NOM_U_BACK |OPEN |

SQL>