oracle locked timed,oracle user locked(timed)处理

故障现象:

SQL> connect scott/scott

ERROR:

ORA-01017: invalid username/password; logon denied

SQL> connect scott/scott

ERROR:

ORA-28000: the account is locked

表明:Oracle 中 scott用户因密码不对,10次以后,就被locked。

SQL> select account_status,lock_date,profile from dba_users where username='SCOTT';

ACCOUNT_STATUS                   TO_CHAR(LOCK_DATE,'D PROFILE

-------------------------------- -------------------- ------------------------------

LOCKED(TIMED)                    31-MAY-2004 19:33:53 DEFAULT

这样,表明再添加oracle session时,就报错,无法连接上去。

故障解决:

(1) 给当前用户解锁:

sql> alter user scott account unlock;

(2) 查看当前用户的限制:

SQL>  SELECT resource_name,resource_type,limit FROM dba_profiles WHERE profile='DEFAULT';

RESOURCE_NAME                    RESOURCE_TYPE LIMIT

-------------------------------- ------------- ----------------------------------------

COMPOSITE_LIMIT                  KERNEL        UNLIMITED

SESSIONS_PER_USER                KERNEL        UNLIMITED

CPU_PER_SESSION                  KERNEL        UNLIMITED

CPU_PER_CALL                     KERNEL        UNLIMITED

LOGICAL_READS_PER_SESSION        KERNEL        UNLIMITED

LOGICAL_READS_PER_CALL           KERNEL        UNLIMITED

IDLE_TIME                        KERNEL        UNLIMITED

CONNECT_TIME                     KERNEL        UNLIMITED

PRIVATE_SGA                      KERNEL        UNLIMITED

FAILED_LOGIN_ATTEMPTS            PASSWORD      10

PASSWORD_LIFE_TIME               PASSWORD      UNLIMITED

PASSWORD_REUSE_TIME              PASSWORD      UNLIMITED

PASSWORD_REUSE_MAX               PASSWORD      UNLIMITED

PASSWORD_VERIFY_FUNCTION         PASSWORD      NULL

PASSWORD_LOCK_TIME               PASSWORD      UNLIMITED

PASSWORD_GRACE_TIME              PASSWORD      UNLIMITED

表明: 10次以后,就 failed_login_attempts 就报错,锁定用户。

需要修改成:unlimited

sql> alter profile default limit FAILED_LOGIN_ATTEMPTS unlimited;

或修改成:次数比较大:100000

sql>alter profile default limit FAILED_LOGIN_ATTEMPTS 100000;

然后再查看资源情况:

SQL> SELECT resource_name,resource_type,limit FROM dba_profiles WHERE profile='DEFAULT';

RESOURCE_NAME                    RESOURCE_TYPE LIMIT

-------------------------------- ------------- ----------------------------------------

COMPOSITE_LIMIT                  KERNEL        UNLIMITED

SESSIONS_PER_USER                KERNEL        UNLIMITED

CPU_PER_SESSION                  KERNEL        UNLIMITED

CPU_PER_CALL                     KERNEL        UNLIMITED

LOGICAL_READS_PER_SESSION        KERNEL        UNLIMITED

LOGICAL_READS_PER_CALL           KERNEL        UNLIMITED

IDLE_TIME                        KERNEL        UNLIMITED

CONNECT_TIME                     KERNEL        UNLIMITED

PRIVATE_SGA                      KERNEL        UNLIMITED

FAILED_LOGIN_ATTEMPTS            PASSWORD      UNLIMITED

PASSWORD_LIFE_TIME               PASSWORD      UNLIMITED

PASSWORD_REUSE_TIME              PASSWORD      UNLIMITED

PASSWORD_REUSE_MAX               PASSWORD      UNLIMITED

PASSWORD_VERIFY_FUNCTION         PASSWORD      NULL

PASSWORD_LOCK_TIME               PASSWORD      UNLIMITED

PASSWORD_GRACE_TIME              PASSWORD      UNLIMITED

16 rows selected

SQL>

这样就不会用:client端因输入密码错误,造成用户被locked(timed)

原文链接:https://www.cnblogs.com/zougang/p/6512906.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值