两个会话上同时执行如下创建Procedure的脚本
begin
for idx in 1 .. 100000000 loop
execute immediate 'create or replace procedure lib_test
is
begin
null;
end;
';
end loop;
end;
抓取等待事件:
select SAMPLE_TIME,
SESSION_ID,
NAME,
P1,
P2,
P3,
WAIT_TIME,
CURRENT_OBJ#,
CURRENT_FILE#,
CURRENT_BLOCK#
from v$active_session_history ash, v$event_name enm
where ash.event# = enm.event#
1 07-7月 -14 10.08.46.694 上午 1619 library cache lock 2171421424 2197228832 301 0 -1 0 0
2 07-7月 -14 10.08.46.694 上午 1628 library cache lock 2171421424 2197084568 301 0 -1 0 0
3 07-7月 -14 10.08.46.694 上午 1629 library cache lock 2171421424 2193480024 301 0 -1 0 0
4 07-7月 -14 10.08.4