Monday, January 5, 2009

ORA-28003, ORA-20002 while changing password

Error Description:
----------------------------

While changing user password ORA-28003 and ORA-20002 raised.
SQL> alter user shaik by a;
alter user shaik by a
*
ERROR at line 1:
ORA-28003: password verification for the specified password failed
ORA-20002: Password length less than 4

Cause of The problem:
----------------------------------

There is a password verify function assigned on the profile of the user. The verify function does not allow to to change password to a and it specifies password length less than 4.

Solution of The Problem:
---------------------------------------
Way 1:
-----------

Change the password as it satisfy the password verfify function. Suppose if function impose restriction password to length at least 4 characters, must have one number and one alphanumeric character and one special character then change the password as following,

SQL> alter user shaik by "b!12";
User altered.

Way 2:
----------------

If you don't care about password verification function then you may disable the function.
To do it first look for the user profile for which you get the error.
SQL> select profile from dba_users where username='SHAIK';
PROFILE
------------------------------
DEFAULT

Then look for the assigned function of the intended profile.
SQL> select RESOURCE_NAME,RESOURCE_TYPE,LIMIT from dba_profiles where PROFILE='DEFAULT' and RESOURCE_NAME='PASSWORD_VERIFY_FUNCTION';

RESOURCE_NAME RESOURCE LIMIT
-------------------------------- -------- ----------------------------------------
PASSWORD_VERIFY_FUNCTION PASSWORD VERIFY_FUNCTION

Either assigned another function of disable the verification function. You can disable it by,
SQL> alter profile default limit PASSWORD_VERIFY_FUNCTION NULL;
Profile altered.

Now change the password.
SQL> alter user shaik identified by a;
User altered.

No comments:

Post a Comment