2011年12月19日 星期一

procedure 或 oracle object 無法 compile 的解決方式



http://blog.xuite.net/daley.yen/blog/8844449
      Del.icio.us furl Google Bookmarks HemiDemi MyShare 加入此網頁到:你推我報 technorati UDN共享書籤 Yahoo! My Web
105
Oracle
好文轉寄

一般是因為該 object 被某個 session lock 住所造成, 可找到相關 session 並做後續處理即可.
步驟如下:
(Better)
1.利用以下語法抓到造成 compile hang 住的 session.
**********************
SELECT * FROM V$SESSION_WAIT WHERE EVENT='library cache pin' order by p1raw;
**********************
p1raw 相同表示使用的 object 相同.
查詢結果會包含 compile 者的 session.
2.利用找到的 SID 與 v$session 找到相關 session 資訊.
3.通知該 session 關係人離線或直接 kill 這些 session (不要砍到自己的).

(Old)
1.利用下列語法查詢 lock 住該 object 的 session
**********************
SELECT * FROM DBA_DDL_LOCKS WHERE NAME = 'XXXXXX';
**********************
2.利用找到的 SID 與 v$session 找到相關 session 資訊
3.通知該 session 關係人離線

1 則留言:

  1. Best 5 Casinos Near Casinos Near Atlanta, GA - MapyRO
    Find 5 광양 출장안마 Casinos Near Atlanta, GA near Atlanta, GA and reviews by real people. MapYRO users can find details on 논산 출장마사지 the area's casinos 울산광역 출장샵 and 이천 출장마사지 other 강릉 출장안마 amenities.

    回覆刪除