ORACLE11g错误密码登录10次将被锁定

ORACLE11g错误密码登录10次将被锁定,测试如下:

SQL> set time on;
15:32:18 SQL> conn gxgat/password
Connected.
15:32:29 SQL> conn gxgat/p
ERROR:
ORA-01017: invalid username/password; logon denied


Warning: You are no longer connected to ORACLE.
15:32:42 SQL> conn gxgat/p
ERROR:
ORA-01017: invalid username/password; logon denied


15:32:48 SQL> conn gxgat/p
ERROR:
ORA-01017: invalid username/password; logon denied


15:32:57 SQL> conn gxgat/p
ERROR:
ORA-01017: invalid username/password; logon denied


15:33:06 SQL> conn gxgat/p
ERROR:
ORA-01017: invalid username/password; logon denied


15:33:11 SQL> conn gxgat/p
ERROR:
ORA-01017: invalid username/password; logon denied


15:33:17 SQL> conn gxgat/p
ERROR:
ORA-01017: invalid username/password; logon denied


15:33:27 SQL> conn gxgat/p
ERROR:
ORA-01017: invalid username/password; logon denied


15:33:38 SQL> conn gxgat/p
ERROR:
ORA-01017: invalid username/password; logon denied


15:33:50 SQL> conn gxgat/p
ERROR:
ORA-01017: invalid username/password; logon denied


15:33:59 SQL> conn gxgat/p
ERROR:
ORA-28000: the account is locked

解锁:

先退出,以sysdba进行登录,执行unlock命令即可。

[oracle@test11g ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Thu Dec 20 15:39:53 2018

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


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

SQL> alter user gxgat account unlock;

User altered.

SQL> conn gxgat/password
Connected.

查看默认错误连接次数锁定:

SQL> set linesize 300
SQL> select * from dba_profiles where resource_name like 'FAILED_LOGIN_ATTEMPTS%';

PROFILE 		       RESOURCE_NAME			RESOURCE LIMIT
------------------------------ -------------------------------- -------- ----------------------------------------
DEFAULT 		       FAILED_LOGIN_ATTEMPTS		PASSWORD 10
MONITORING_PROFILE	       FAILED_LOGIN_ATTEMPTS		PASSWORD UNLIMITED

SQL> 

修改默认的错误登录次数,为不限制

SQL> alter profile DEFAULT limit FAILED_LOGIN_ATTEMPTS UNLIMITED;

查看被锁的用户

15:51:48 SQL> select LOCK_DATE,username from dba_users where username='GXGAT';

LOCK_DATE USERNAME
--------- ------------------------------
20-DEC-18 GXGAT

LOCK_DATE为空说明没有锁定,非空为锁定。

或者

SELECT S.USERNAME,
       DECODE(L.TYPE, 'TM', 'TABLE LOCK', 'TX', 'ROW LOCK', NULL) LOCK_LEVEL,
       O.OWNER,
       O.OBJECT_NAME,
       O.OBJECT_TYPE,
       S.SID,
       S.SERIAL#,
       S.TERMINAL,
       S.MACHINE,
       S.PROGRAM,
       S.OSUSER
   FROM V$SESSION S, V$LOCK L, DBA_OBJECTS O
WHERE S.SID = L.SID
   AND O.OBJECT_ID = L.ID1
   AND S.USERNAME IS NOT NULL;
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

黄宝康

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值