Tuesday 20 September 2016

Internal Exception: java.sql.SQLException: ORA-28001: the password has expired while starting Weblogic Services




Please follow the below NOTE for any user expired error:


The Impact of PASSWORD_LIFE_TIME Database Profile Parameter Default to 180 Days on Network Charging and Control (Doc ID 1543668.1)

ORA-28000: the account is locked
If the login occurs via the SMS Screens, the Java console should show:
 Exception raised is --->28001
 java.sql.SQLException: ORA-28001: the password has expired
Login to database as sysdba
SQL> connect / as sysdba
3. Set the lines & pages formatting to better format the output
SQL> set lines 99
SQL> set pages 999
4. Get the current DEFAULT profile
SQL> select resource_name, limit from dba_profiles where profile = 'DEFAULT' order by 1;
5. Set PASSWORD_LIFE_TIME to UNLIMITED
SQL> alter profile DEFAULT limit PASSWORD_LIFE_TIME UNLIMITED;
Run the ALTER USER command for any user that is already in "EXPIRED (GRACE)" & "EXPIRED" state.
6. Identify any user that is already in "EXPIRED (GRACE)" & "EXPIRED" state
SQL> select username, profile, account_status from dba_users where account_status in ('EXPIRED(GRACE)', 'EXPIRED') order by 1;
To reset the user password, you will need to query both password & spare4 column in user$ table, which stores a hash value of case insensitive password and case sensitive password respectively. You can use the following SQL command to generate a complete "alter user ..." syntax for a specific user:
SQL> select sqltext from
(
    select name, 'alter user '||name||' identified by values '''||password||''';' sqltext from user$ where spare4 is null and password is not null
    union
    select name, 'alter user '||name||' identified by values '''||spare4||';'||password||''';' sqltext from user$ where spare4 is not null and password is not null
) where name = ;
Example:
SQL> select sqltext from (select name, 'alter user '||name||' identified by values '''||password||''';' sqltext from user$ where spare4 is null and password is not null  union  select name, 'alter user '||name||' identified by values '''||spare4||';'||password||''';' sqltext from user$ where spare4 is not null and password is not null ) where name = 'DEV_OMSM';
SQLTEXT
--------------------------------------------------------------------------------
alter user DEV_OMSM identified by values 'S:33F61566C1D2238C8B8C13B20918D7BAE1DE
1D1D2498BD50C3742D6F0FB1;A63CD969AFE9D774';
SQL> alter user DEV_OMSM identified by values 'S:33F61566C1D2238C8B8C13B20918D7BAE1DE1D1D2498BD50C3742D6F0FB1;A63CD969AFE9D774';
User altered.
SQL> commit;
Commit complete.
Thanks  By  Srini

No comments:

Post a Comment


No one has ever become poor by giving