我們先看如下的一系列執行:
SQL> create or replace view v_bmw_pay_online_new as
2 select *
3 from taobao.bmw_pay_online_new@lnk_db215;
SQL> create or replace procedure sp_v_test is
2 v_id number;
3 begin
4 select id into v_id from v_bmw_pay_online_new where id=1;
5 end;
6 /
Procedure created
SQL> create or replace synonym s_bmw_pay_online_new
2 for taobao.bmw_pay_online_new@lnk_db215;
Synonym created
SQL> create or replace procedure sp_s_test is
2 v_id number;
3 begin
4 select id into v_id from s_bmw_pay_online_new where id=1;
5 end;
6 /
Warning: Procedure created with compilation errors
SQL> show error
Errors for PROCEDURE TAOBAO.SP_S_TEST:
LINE/COL ERROR
-------- ------------------------------------------------------------------------------------
4/29 PL/SQL: ORA-00600: 內部錯誤碼,參數: [17069], [0x57E77854], [], [], [], [], [], []
4/4 PL/SQL: SQL Statement ignored
可以看到,在同樣一個遠程對象上面,我可以通過建立視圖,然後在該視圖上建立預存程序,是沒有任何問題的,但是如果我對該遠程操作做一個同義字,再在同義字上建立預存程序,則報出了Ora-00600。跟蹤也無果,看產生的記錄檔也不能看出來什麼,上metalink,搜尋"ora-00600 17069",發現查出現的東西一大堆,大致是library cache錯誤,但是到底怎麼會產生這個錯誤呢,online聯絡上一個oracle線上支援人員,聊了一會兒,問題是解決了,但是他就是不承認是bug,呵呵。
以下是聊天的總結:
ORA-00600 [17069] reorted on compiling a procedure.
Invalid lock in library cache.
Unable to pin the object and hence the Error.
<Note:39616.1> "Failed to pin a library cache object after 50 attempts"
Clearing the shared memory will help to get rid of inconsistant information in memory which is causing the error.
The inconsistency was suspected to be in the remote site. But flushing the shared pool in remote location didnt help.
Tried recreation of the procedure after dropping and recreating the synonym in the local database. But the same failed.
Flushed the shared pool in local database abd successfully created the procedure.