ORA-04028: cannot generate diana for object xxx
?
在ORACLE數(shù)據(jù)庫(10.2.0.5.0)上修改一個包的時候,編譯有錯誤,具體錯誤信息為"ORA-04028: cannot generate diana for object xxx"。
?
Warning: Package Body created with compilation errors.?SQL> show error;Errors for PACKAGE BODY XXXXX."XXXXXXXX":?LINE/COL ERROR-------- -----------------------------------------------------------------0/0????? ORA-04028: cannot generate diana for object???????? xxxx.xxxxx?SQL>?
第一次遇到這樣的錯誤信息,有點(diǎn)懵,查看錯誤信息具體解釋,解釋有l(wèi)ock conflict, 但是所涉及表根本沒有任何會話進(jìn)程鎖定。在Meta Link上搜索,才發(fā)現(xiàn)是一個Bug
?
?
$ oerr ora 4028
04028, 00000, "cannot generate diana for object %s%s%s%s%s"
// *Cause:? Cannot generate diana for an object because of lock conflict.
// *Action: Please report this error to your support representative.
?
?
?
當(dāng)包依賴的視圖重建后,如果此時嘗試編譯包就會遇到這個錯誤,而我所遇到情況是包所依賴的表重建了。 具體可以參考ORA-4028 ERROR WHILE RECOMPILING PL/SQL PACKAGE (文檔 ID 1505092.1),
?
?
APPLIES TO:
?
PL/SQL - Version 10.2.0.5 to 10.2.0.5 [Release 10.2]
Information in this document applies to any platform.
?
SYMPTOMS
?
?
Attempting to compile a package fails after the creation of a dependent view with:
?
ORA-04028: cannot generate diana for object SCOTT.V_TEST
?
?
Testcase Scenario:
?
SQL> CREATE OR REPLACE VIEW V_TEST
(a, b)
AS
select a,b from test
/
? 2 3 4 5
View created.
?
SQL> alter package p_test compile;
alter package p_test compile
*
ERROR at line 1:
ORA-04028: cannot generate diana for object SCOTT.V_TEST
?
?
CAUSE
unpublished Bug 9342254 - ORA-4028: CANNOT GENERATE DIANA OBJECT AND ORA-4020 : DEAD LOCK
?
?
SOLUTION
The defect is fixed in 11.1 or later.
Download and apply the Patch 9342254 for your version and platform.
?
?
如上所示,這個是一個bug來的,在ORACLE 11.1以及以后版本已經(jīng)fix掉了,如果遇到這個問題,要么應(yīng)用補(bǔ)丁9342254 ,如果不能立馬應(yīng)用補(bǔ)丁,經(jīng)過測試也有兩種方法解決:
?
1:重啟數(shù)據(jù)庫,然后重編譯包。這時可以重新編譯包,不會遇到這個錯誤。
2:清空SHARED_POOL,然后重編譯包。(ALTER SYSTEM FLUSH SHARED_POOL;)
轉(zhuǎn)載于:https://www.cnblogs.com/kerrycode/p/7772062.html
總結(jié)
以上是生活随笔為你收集整理的ORA-04028: cannot generate diana for object xxx的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Apache Kafka 1.0.0正式
- 下一篇: 冬季奥运会纪念钞怎么预约