將Oracle 升級到9.2.0.8. 剛才查看無效對象,發現有幾個ODCxx 開頭的無效對象。 查看Oracle,說是9.2.0.8 以後的版本中,不知道的原因導致這些對象無效,這些對象在Oracle 10.2 以後的版本中已經刪除掉了。 所以可以忽略這些無效對象。
SQL> select object_type,owner,object_name from all_objects where status='INVALID' and owner='SYS';
OBJECT_TYPE OWNER OBJECT_NAME
------------------ ------------------------------ ------------------------------
TYPE SYS ODCICOLINFO
TYPE SYS ODCIINDEXINFO
TYPE SYS ODCIINDEXINFO
TYPE SYS ODCIARGDESC
TYPE SYS ODCICOST
嘗試修複對象:
SQL> ALTER TYPE SYS.ODCICOST COMPILE;
ALTER TYPE SYS.ODCICOST COMPILE
*
第 1 行出現錯誤:
ORA-02311: 無法使用 COMPILE 選項改變具有類型或表相關性的有效類型
ORA-02311: |
cannot alter with COMPILE option a valid type with type or table dependents |
Cause: |
An attempt was made to ALTER with COMPILE option a type that is valid and has type or table dependents. |
Action: |
No need to perform this operation. |
Oracle 的解釋:
Applies to:
Oracle Server - Enterprise Edition - Version: 9.2.0.8 and later [Release: 9.2 and later ]
Information in this document applies to any platform.
Symptoms
The following invalid objects have been found in Oracle 9.2.0.8.0 database:
SQL> select * from dba_objects where status!='VALID' and owner='SYS';
OWNER
------------------------------
OBJECT_NAME
--------------------------------------------------------------------------------
SUBOBJECT_NAME OBJECT_ID DATA_OBJECT_ID OBJECT_TYPE
------------------------------ ---------- -------------- ------------------
CREATED LAST_DDL_ TIMESTAMP STATUS T G S
--------- --------- ------------------- ------- - - -
SYS
ODCIARGDESC
$VSN_1 3379 TYPE
12-MAY-02 12-MAY-02 2002-05-12:16:18:04 INVALID N N N
SYS
ODCICOLINFO
$VSN_1 3362 TYPE
12-MAY-02 12-MAY-02 2002-05-12:16:18:02 INVALID N N N
SYS
ODCICOST
$VSN_1 3377 TYPE
12-MAY-02 12-MAY-02 2002-05-12:16:18:03 INVALID N N N
SYS
ODCIINDEXINFO
$VSN_1 3366 TYPE
12-MAY-02 12-MAY-02 2002-05-12:16:18:02 INVALID N N N
SYS
ODCIINDEXINFO
$VSN_2 3367 TYPE
12-MAY-02 12-MAY-02 2002-05-12:16:18:02 INVALID N N N
Cause
It is unknown what has turned the objects invalid.
Solution
The objects in question will be dropped during upgrade to Oracle 10.2.x / 11.1.x / 11.2.x due to fact that the following script is run as part of upgrade: ?/rdbms/admin/c090200.sql:
...
Rem Drop these types so that they will be recreated (no longer evolved)
DROP TYPE ODCIIndexInfo FORCE;
DROP TYPE ODCICost FORCE;
DROP TYPE ODCIArgDesc FORCE;
DROP TYPE ODCIEnv FORCE;
------------------------------------------------------------------------------
Blog: http://blog.csdn.net/tianlesoftware
網上資源: http://tianlesoftware.download.csdn.net
相關視頻:http://blog.csdn.net/tianlesoftware/archive/2009/11/27/4886500.aspx
DBA1 群:62697716(滿); DBA2 群:62697977(滿)
DBA3 群:62697850 DBA 超級群:63306533;
聊天 群:40132017
--加群需要在備忘說明Oracle資料表空間和資料檔案的關係,否則拒絕申請