使用impdp工具导入,发现dw00进程在编译包时候在等待library cache pin 事件:
- SQL> select sid,program,event,BLOCKING_SESSION,state,sql_id from v$session where username is
- not null and status='ACTIVE'order by event,sql_id;
- SID PROGRAM EVENT BLOCKING_SESSION STATE
- SQL_ID
- --- ------------------------------------------------ ----------------------------------- ---------------- -------------------
- -------------
- 38 sqlplus@dbserver (TNS V1-V3) SQL*Net message to client WAITED SHORT
- TIME 6jg0jp7ggufy6
- 5 emagent@dbserver (TNS V1-V3) Streams AQ: waiting for messages in WAITING
- the queue
- 134 oracle@dbserver (DW00) library cache pin 134 WAITING
- 5bdu5n68x313q
- 189 OMS wait for unread message on broadcas WAITING
- 2b064ybzkwf1y
- t channel
- 68 udi@dbserver (TNS V1-V3) wait for unread message on broadcas WAITING
- SQL> select * from table(dbms_xplan.display_cursor('5bdu5n68x313q'));
- PLAN_TABLE_OUTPUT
- ----------------------------------------------------------------------------------------------------------------------------------------
- ----------------------------------------------------------------
- SQL_ID 5bdu5n68x313q, child number 0
- ALTER PACKAGE "HFMIS"."PKG_CPT_MSG" COMPILE BODY
- PLSQL_OPTIMIZE_LEVEL= 2 PLSQL_CODE_TYPE= INTERPRETED
- PLSQL_DEBUG= TRUE PLSCOPE_SETTINGS= 'IDENTIFIERS:NONE' REUSE
- SETTINGS TIMESTAMP '2012-12-17 19:07:36'
导入时没有使用并行,且没有任何其他进程连上数据库,出现这种异常情况,而且阻塞进程是自己本身,估计很有可能是oracle bug造成的
搜索metlink,发现与文档《Bug 13624984 - IMPDP or IMP hangs on compilation of PLSQL containinga pipelined function [ID 13624984.8]》所描述相吻合;
Impdp在编译包含有管道函数的pl/sql包时遇到了此bug
处理方式:
1) Do not use datapump import nor import to load and compile the PLSQL
or
2) Manually grant EXECUTE WITH GRANT OPTION privilege on the shadow
type to the user doing the compilation before attempting
the compilation.
or
3) Wait for the compilation to finish - it will complete - it just
blocks for 15-30 minutes
4)patch to 11.2.0.3.4 version
这里打补丁至11.2.0.3.4版本后再次执行impdp故障解除
转载于:https://blog.51cto.com/csdw81/1109772