Search code examples
sqldatabaseoracle-databasealterchange-password

How to reset schema password without any length restriction criteria in Oracle Database?


Password reset error in Oracle database, please find below:

SQL> alter user test_user identified by pteis34;
alter user test_user identified by pteis34
*
ERROR at line 1:
ORA-28003: password verification for the specified password failed
ORA-20002: Password length less than 9

Solution

  • Please follow the below statements to reset password:

    SQL> select username,profile from dba_users where username='TEST_USER';
    
    USERNAME                       PROFILE
    ------------------------------ ------------------------------
    TEST_USER                       DEFAULT
    
    SQL>
    
    SQL> select profile, limit from dba_profiles where resource_name = 
    'PASSWORD_VERIFY_FUNCTION' and profile='DEFAULT';
    
    PROFILE                        LIMIT
    ------------------------------ ----------------------------------------
    DEFAULT                        VERIFY_PASSWORD_FUNCTION
    
    
    SQL> ALTER PROFILE "DEFAULT" LIMIT PASSWORD_VERIFY_FUNCTION null;
    
    Profile altered.
    
    SQL> alter user TEST_USER identified by pteis34;
    
    User altered.
    
    SQL> ALTER PROFILE "DEFAULT" LIMIT PASSWORD_VERIFY_FUNCTION VERIFY_PASSWORD_FUNCTION;
    
    Profile altered.
    
    SQL> conn TEST_USER/pteis34@DB_STRING
    Connected.
    SQL> show user
    USER is "TEST_USER"
    SQL>