http://www.cnblogs.com/songling/archive/2012/12/13/2815725.html
现在用oracle11g,可是过段时间用户就被锁了郁闷了很久,后来在网上查询知道,原来oracle有登录失败次数failed_login_attempts限制,超过指定的次数后就会自动锁了
解决方法:
修改参数failed_login_attempts=unlimited;
SQL>sqlplus /nolog
SQL>conn sys/sys as sysdba;
一、解锁:
SQL>alter user username account unlock;
SQL>commit;
二、修改登录失败次数限制:
Connected.
SQL> desc dba_profiles;
名称 是否为空 类型
----------------------------------------- -------- --------------
PROFILE NOT NULL VARCHAR2(30)
RESOURCE_NAME NOT NULL VARCHAR2(32)
RESOURCE_TYPE VARCHAR2(8)
LIMIT VARCHAR2(40)
SQL> select resource_name,limit from dba_profiles where resource_name=‘FAILED_LOGIN_ATTEMPTS‘;
RESOURCE_NAME LIMIT
-------------------------------- ----------------------------------------
FAILED_LOGIN_ATTEMPTS 10
查询FAILED_LOGIN_ATTEMPTS值为10,也就是说从第一次登录失败开始计算,连续登陆失败的次数。而不是累计失败的次数
2.修改FAILED_LOGIN_ATTEMPTS的值
SQL> alter profile default limit failed_login_attempts unlimited;
配置文件已更改
SQL> select resource_name,limit from dba_profiles where resource_name=‘FAILED_LO
GIN_ATTEMPTS‘;
RESOURCE_NAME LIMIT
-------------------------------- ----------------------------------------
FAILED_LOGIN_ATTEMPTS UNLIMITED