编译正在调用的函数等待library cache pin
2017-11-19 21:15
375 查看
create or replace function get_sal(name1 number) return number is v_sal number; begin select name1+20 into v_sal from dual; /*dbms_lock.sleep(30);*/ return v_sal; end get_sal; select get_sal(11) from dual; SQL> create or replace function get_sal(name1 number) return number is 2 v_sal number; 3 begin 4 select name1+20 into v_sal from dual; 5 dbms_lock.sleep(30); 6 return v_sal; 7 end get_sal; 8 / Warning: Function created with compilation errors SQL> show err Errors for FUNCTION TLCB.GET_SAL: LINE/COL ERROR -------- ------------------------------------- 5/3 PLS-00201: 必须声明标识符 'DBMS_LOCK' 5/3 PL/SQL: Statement ignored 需要赋权: SQL> grant execute on dbms_lock to tlcb; 授权成功。 SESSION 69 select * from v$mystat a where rownum<2; --69 SESSION 71 create or replace function get_sal(name1 number) return number is v_sal number; begin select name1 + 20 into v_sal from dual; DBMS_LOCK.SLEEP(10); return v_sal; end get_sal; SELECT SID,EVENT FROM V$SESSION WHERE SID IN (69,71) 1 69 PL/SQL Developer plsqldev.exe PL/SQL lock timer 2 71 PL/SQL Developer plsqldev.exe library cache pin
相关文章推荐
- [转载]编译存储过程时遇到的library cache pin等待事件解决过程
- 分析解决因”library cache pin”等待
- 关于library cache pin和lock等待事件的理解
- 分析解决因”library cache pin”等待
- 存储过程不能编译(Library cache pin)问题的解决
- latch: library cache pin等待事件
- library cache pin和lock等待分析
- LIBRARY CACHE PIN 等待事件
- library cache pin等待事件的处理
- 怎么发现RAC环境中'library cache pin'等待事件的阻塞者(Blocker)?
- 分析解决因”library cache pin”的等待
- 分析解决因”library cache pin”等待
- library cache pin等待事件
- library cache pin 和lock 等待分析
- latch: library cache pin等待事件
- 怎么发现RAC环境中'library cache pin'等待事件的堵塞者(Blocker)?
- 关于cursor: pin S wait on X 和 library cache pin 及其他等待事件
- library cache pin等待事件处理
- 发现个library cache LOCK AND library cache pin 等待事件
- 一次library cache pin故障的解决过程