修改oracle database中user的密码遇到ORA-28003和ORA-20001

[root@hosta bin]# su - oracle
[oracle@hosta ~]$ sqlplus dbsnmp/dbsnmp@prod1

SQL*Plus: Release 11.1.0.7.0 - Production on Thu Feb 25 04:59:07 2016

Copyright (c) 1982, 2008, Oracle.  All rights reserved.

ERROR:
ORA-28000: the account is locked


Enter user-name:

[oracle@hosta ~]$ sqlplus sys/oracle@prod1 as sysdba

SQL*Plus: Release 11.1.0.7.0 - Production on Thu Feb 25 04:59:22 2016

Copyright (c) 1982, 2008, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> alter user dbsnmp account unlock;

User altered.

SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@hosta ~]$ sqlplus dbsnmp/dbsnmp@prod1

SQL*Plus: Release 11.1.0.7.0 - Production on Thu Feb 25 04:59:43 2016

Copyright (c) 1982, 2008, Oracle.  All rights reserved.

ERROR:
ORA-28001: the password has expired


Changing password for dbsnmp
New password:----------------->>>敲入dbsnmp
Retype new password:---------->>>敲入dbsnmp,报出如下提示:
ERROR:
ORA-28003: password verification for the specified password failed
ORA-20001: Password length less than 8


Password unchanged
Enter user-name:

解决方法:
$ORACLE_HOME/rdbms/admin/utlpwdmg.sql中:

ALTER PROFILE DEFAULT LIMIT
PASSWORD_LIFE_TIME 180
PASSWORD_GRACE_TIME 7
PASSWORD_REUSE_TIME UNLIMITED
PASSWORD_REUSE_MAX UNLIMITED
FAILED_LOGIN_ATTEMPTS 10
PASSWORD_LOCK_TIME 1
PASSWORD_VERIFY_FUNCTION null;----->>>>此处改成null即可让ORA-28003: password verification for the specified password failed 和ORA-20001: Password length less than 8错误不再出现。

你可能感兴趣的:(Oracle,DB)