Useful shortcuts for vi editor

Friday 6 October 2017

ORA-28000 solution

Error
ORA-28000: the account is locked

Solution
Find the assigned profile for related user
SQL> select profile from DBA_USERS where username = 'HR';
-- e.g. DEFAULT

Disable failed_login_attempts parameter
SQL> alter profile "DEFAULT" limit failed_login_attempts UNLIMITED;

Check it
SQL> select resource_name,limit from dba_profiles where profile='DEFAULT';

Apply the new setting for user
SQL> alter user "HR" ACCOUNT UNLOCK;