High 'library cache lock' Wait Time Due to Invalid Login Attempts
High 'library cache lock' Wait Time Due to Invalid Login Attempts (文件 ID 1309738.1)
Applies to:
Oracle Database - Enterprise Edition - Version 10.2.0.5 and laterInformation in this document applies to any platform.
Symptoms
- 'Library cache lock' or 'row cache lock' can be observed when concurrent users login with wrong password to the database.
- The 'row cache lock' is seen in 10.2 and 11.1 while the 'library cache lock' is seen in 11.2.
-
ASH Report displays
-
High Percentage of execution time attributed to Connection Management:
-
High percentage of calls of type OAUTH
-
High Percentage of execution time attributed to Connection Management:
-
Stack contains one of the following functions:
kziavua
kziaia
kziasfc -
Checking the exclusive holder from DBA_DDL_LOCKS, a session may be seen holding a lock type (kglhdnsp) 79 on object (kglnaobj) 5:
SQL> select * from dba_ddl_locks where mode_held='Exclusive';
SESSION_ID OWNER NAME TYPE MODE_HELD MODE_REQU
---------- --------- ---------- ---------- --------- ---------
612 5 79 Exclusive None
-
If AUDIT_TRAIL is enabled, login failures can be checked by running SQLs similar to the following:
Checks for entries in the last 7 days in DBA_AUDIT_TRAIL with error ORA-1017 invalid username/password; logon denied
select username, os_username, userhost, client_id, trunc(timestamp), count(*) fa
iled_logins
from dba_audit_trail
where returncode = 1017
and timestamp > sysdate - 7
group by username, os_username, userhost, client_id, trunc(timestamp);
Checks for entries in the last 7 days in DBA_AUDIT_SESSION where an error was returnedselect username, os_username, userhost, timestamp, returncode
from sys.dba_audit_session
where returncode != 0
and timestamp > sysdate - 7;
Changes
Many users with wrong password try to login to the database simultaneously
Cause
A hang is possible in earlier versions of RDBMS as a result of an unpublished bug fixed in the following versions:
12.1.0.1 (Base Release)
11.2.0.2 (Server Patch Set)
11.1.0.7 Patch 42 on Windows Platforms
Even with this fix, numerous failed logins attempts can cause row cache lock waits and/or library cache lock waits.
This was reported in:
This was closed as not a bug because there is an intentional wait when a login fails.
Solution
In Oracle 11g Release 11.1.0.7, the wait is disabled unconditionally
In Oracle 11g Release 2 and higher, in order to disable the
wait between login failures the event 28401 needs to be explicitly
enabled:
The event can be set as follows:
For more information see:
Note: Care should be taken when setting this event, as this is disabling the sleep time which can leave the system more vulnerable.
For databases using MTS, a further enhancement has been created in:
: DB12.2SEC: LOCK_DATE NOT RESET EVEN AFTER A/C UNLOCKED POST PWD_LOCK_TIME ELAPSE
as setting the event is not as effective as it is for dedicated systems. The following enhancement is included in 12.2:
"The
failed login counter will be disabled entirely for any user that has
the setting UNLIMITED for their account's FAILED_LOGIN_ATTEMPTS password
profile setting."
References
- LOTS OF 'LIBRARY CACHE LOCK' DURING USER LOGON AUTHENTICATIONNOTE:7715339.8 - Bug 7715339 - Logon failures causes "row cache lock" waits - Allow disable of logon delay
- LIBRARY CACHE LOCK CAUSED BY WRONG PASSWORD LOGIN
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/31393455/viewspace-2130986/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- oracle library cache之library cache lock_library cache pin wait event釋義OracleAI
- 0317Library Cache Pin/Lock Wait EventsAI
- library cache lock和cursor: pin S wait on X等待AI
- sql version count引發cursor:pin s wait x及library cache latch library cache lockSQLAI
- Library Cache Pin 及 Library Cache Lock分析
- library cache lock和library cache pin理解
- LIBRARY CACHE LOCK 等待事件事件
- FAILED_LOGIN_ATTEMPTSAI
- library cache pin和library cache lock的診斷分析
- library cache lock和library cache pin區別總結
- latch:library cache lock等待事件事件
- oracle異常:library cache lockOracle
- 定位Library Cache pin,Library Cache lock等待的解決方法
- zt_如何平面解決library cache lock和library cache pin
- enq:Library cache lock/pin等待事件ENQ事件
- library cache lock 阻塞程式查詢
- Library cache lock/pin詳解(轉)
- 常用定位library cache lock的方法
- LIBRARY CACHE LOCK WAITS AND NO BLOCKER FOUNDAIBloC
- Oracle FAILED_LOGIN_ATTEMPTS 理解OracleAI
- 短連線 引起的 library cache lock
- 查詢library cache lock的源頭
- zt_如何使用event 10049分析定位library cache lock and library cache pin
- SEC_MAX_FAILED_LOGIN_ATTEMPTS 用途AI
- 一次library cache lock 問題分析
- 【TUNE_ORACLE】等待事件之“library cache lock”Oracle事件
- library cache pin/lock的解決辦法
- zt_library cache pin和lock等待分析
- 尋找 library cache lock 等待事件的session事件Session
- 'library cache lock'等待事件的處理方法事件
- oracle 10049 event之library cache lockOracle
- 俺也談談 library cache lock 等待事件事件
- 深入理解shared pool共享池之library cache的library cache lock系列四
- [20240824]跟蹤library cache lock library cache pin使用gdb.txt
- [20240920]跟蹤library cache lock library cache pin使用gdb.txt
- [Oracle]--Library cache lock 故障解決一例Oracle
- library cache lock\pin的查詢與處理
- RAC 環境Library Cache Lock的處理方法