使用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故障解除