Home » ORA-28000: the account is locked

ORA-28000: the account is locked

by tuanlp

 

ORA-28000: the account is locked

1. Check the Status of User account in Oracle

col username for a22
col account_status for a17
col profile for a10
Select username, account_status,profile from dba_users where username = 'DVF';

USERNAME               ACCOUNT_STATUS    PROFILE
---------------------- ----------------- ----------
DVF                    LOCKED            DEFAULT

--For 12c container database check common user or specific PDB user
col username for a22
col account_status for a17
col profile for a10
Select username, account_status,profile,common from dba_users where username = 'DVF';

2. For unlock the account you have to run the following command:
For Unlock the account:

ALTER USER username ACCOUNT UNLOCK;

--DVF user If 12c login with container sysdba
SQL> alter user dvf account unlock;
User altered.

3. Check password policy user is using for permanent solution:

col profile for a10
select profile from dba_users where username = 'DVF';

PROFILE
----------
DEFAULT

4. Check the profile resource value in the default profile:

set pages 200
col resourse_name for a10
col limit for a10
col common for a3
select resource_name,limit from dba_profiles where profile='DEFAULT' and resource_name = 'PASSWORD_LIFE_TIME';

RESOURCE_NAME                    LIMIT  
-------------------------------- -------
PASSWORD_LIFE_TIME               180    

--For 12c
set pages 200
col resourse_name for a10
col limit for a10
col common for a3
select resource_name,limit,common from dba_profiles where profile='DEFAULT' and resource_name = 'PASSWORD_LIFE_TIME';

5. If you want to Change the profile resource to unlimited value from 180 days:

ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;

You may also like