Oracle 11g下重现library cache lock等待事件
2014-08-11 11:43
549 查看
从下面的例子中可以看到,在生产数据库中对象的重新编译会导致library cache lock,所以应该尽量避免在业务高峰期编译对象。如果是package或过程中存在复杂的依赖关系就极易导致library cache lock的出现,所以在应用开发的过程中,也应该注意这方面的问题。
session1:
SQL> select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
SQL> create or replace procedure pining
is
begin
null;
end;
/
SQL> create or replace procedure calling
is
begin
pining;
dbms_lock.sleep(200);
end;
/
session2:
alter procedure pining compile;
session3:
drop procedure pining;
session4:
SQL> select sid, event,wait_class, seconds_in_wait
2 from v$session_wait w
3 where w.WAIT_CLASS <> 'Idle';
SID EVENT WAIT_CLASS
---------- ---------------------------------------------------------------- ----------------
6 library cache lock Concurrency
132 library cache pin Concurrency
191 SQL*Net message to client Network
session1:
SQL> select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
SQL> create or replace procedure pining
is
begin
null;
end;
/
SQL> create or replace procedure calling
is
begin
pining;
dbms_lock.sleep(200);
end;
/
session2:
alter procedure pining compile;
session3:
drop procedure pining;
session4:
SQL> select sid, event,wait_class, seconds_in_wait
2 from v$session_wait w
3 where w.WAIT_CLASS <> 'Idle';
SID EVENT WAIT_CLASS
---------- ---------------------------------------------------------------- ----------------
6 library cache lock Concurrency
132 library cache pin Concurrency
191 SQL*Net message to client Network
相关文章推荐
- Oracle grant 授权 出现 library cache lock 等待事件 处理
- latch:library cache lock等待事件
- 关于library cache pin和lock等待事件的理解
- [ORACLE 11G]ROW CACHE LOCK 等待
- 11g等待事件之library cache: mutex X
- cursor:mutex S和library cache lock 等待事件
- Oracle 11.2.0.3数据库CJQ进程造成row cache lock等待事件影响job无法停止问题分析
- Oracle grant 授权 出现 library cache lock 等待事件 处理
- 11g等待事件之library cache: mutex X
- latch:library cache lock等待事件
- oracle 11g 多次业务用户被锁定 library cache lock导致数据hang住问题解决
- 11g等待事件之library cache: mutex X
- 遇到Library cache load lock 等待事件
- Oracle Library Cache 的 lock 与 pin 说明
- library cache latch等待事件
- Oracle Library Cache Lock 解决思路
- latch: library cache pin等待事件
- Oracle Library Cache Lock 解决思路
- library cache pin 和lock 等待分析
- library cache lock事件【10G】实验