資料庫是從Oracle10.2.0.5 升級到11.2.0.3的:
Oracle 使用RMAN 將 DB 從10g 直接Restore 到11g 樣本
http://blog.csdn.net/tianlesoftware/article/details/7311352
在升級的過程中就有這個問題,同時還伴隨這XDB和ORDIM 兩個組件無效的問題,如下:
SQL> col comp_id for a15
SQL> col version for a15
SQL> col comp_name for a30
SQL> selectcomp_id,comp_name,version,status from dba_registry;
COMP_ID COMP_NAME VERSION STATUS
--------------------------------------------- --------------- -----------------
AMD OLAP Catalog 11.2.0.3.0 VALID
EM Oracle Enterprise Manager 11.2.0.3.0 VALID
SDO Spatial 11.2.0.3.0 VALID
ORDIM Oracle Multimedia 11.2.0.3.0 INVALID
XDB Oracle XML Database 11.2.0.3.0 INVALID
CONTEXT Oracle Text 11.2.0.3.0 VALID
ODM Oracle Data Mining 11.2.0.3.0 VALID
EXF Oracle Expression Filter 11.2.0.3.0 VALID
RUL Oracle Rules Manager 11.2.0.3.0 VALID
OWM Oracle Workspace Manager 11.2.0.3.0 VALID
CATALOG Oracle Database Catalog Views 11.2.0.3.0 VALID
COMP_ID COMP_NAME VERSION STATUS
--------------------------------------------- --------------- -----------------
CATPROC Oracle Database Packages and T11.2.0.3.0 INVALID
JAVAVM JServer JAVA Virtual Machine 11.2.0.3.0 VALID
XML Oracle XDK 11.2.0.3.0 VALID
CATJAVA Oracle Database Java Packages 11.2.0.3.0 VALID
XOQ Oracle OLAP API 11.2.0.3.0 VALID
APS OLAP Analytic Workspace 11.2.0.3.0 VALID
17 rows selected.
在用XDB Reload 的方法,重建了所有XDB對象後,XDB變成有效對象:
SQL> selectcomp_id,comp_name,version,status from dba_registry;
COMP_ID COMP_NAME VERSION STATUS
--------------------------------------------- --------------- -----------------
AMD OLAP Catalog 11.2.0.3.0 VALID
EM Oracle Enterprise Manager 11.2.0.3.0 VALID
SDO Spatial 11.2.0.3.0 VALID
ORDIM Oracle Multimedia 11.2.0.3.0 INVALID
XDB Oracle XML Database 11.2.0.3.0 VALID
CONTEXT Oracle Text 11.2.0.3.0 VALID
ODM Oracle Data Mining 11.2.0.3.0 VALID
EXF Oracle Expression Filter 11.2.0.3.0 VALID
RUL Oracle Rules Manager 11.2.0.3.0 VALID
OWM Oracle Workspace Manager 11.2.0.3.0 VALID
CATALOG Oracle Database Catalog Views 11.2.0.3.0 VALID
COMP_ID COMP_NAME VERSION STATUS
--------------- --------------------------------------------- -----------------
CATPROC Oracle Database Packages and T11.2.0.3.0 VALID
JAVAVM JServer JAVA Virtual Machine 11.2.0.3.0 VALID
XML Oracle XDK 11.2.0.3.0 VALID
CATJAVA Oracle Database Java Packages 11.2.0.3.0 VALID
XOQ Oracle OLAP API 11.2.0.3.0 VALID
APS OLAP Analytic Workspace 11.2.0.3.0 VALID
17 rows selected.
這裡的ORDIM 組件還是無效的,在Reload 該組件時,執行@?/ord/im/admin/imxreg.sql;指令碼的時候,還是有大量的這種錯誤:
SQL> @?/ord/im/admin/imxreg.sql;
PL/SQL procedure successfully completed.
declare
*
ERROR at line 1:
ORA-31000: Resource'http://xmlns.oracle.com/xdb/acl.xsd' is not an XDB schema
document
ORA-06512: at line 1240
declare
*
ERROR at line 1:
ORA-31000: Resource'http://xmlns.oracle.com/xdb/acl.xsd' is not an XDB schema
document
ORA-06512: at line 1010
declare
*
ERROR at line 1:
ORA-31000: Resource'http://xmlns.oracle.com/xdb/acl.xsd' is not an XDB schema
document
ORA-06512: at line 1008
declare
*
ERROR at line 1:
ORA-31000: Resource'http://xmlns.oracle.com/xdb/acl.xsd' is not an XDB schema
document
ORA-06512: at line 1012
ORDIM 的Reload 也會掛住,所以在XDB和ORDIM 組件都無效的情況,不能採用Reload XDB組件的方法來解決,而應該採用reinstall XDB的方式來解決,這樣就可以避免出現ORA-31000的錯誤,也可以順利Reload ORDIM 組件。
關於XDB 組件重建和Reload 的更多內容,參考我的Blog:
Oracle XDB 組件 重建 說明
http://blog.csdn.net/tianlesoftware/article/details/7323139
--卸載XDB:
SQL> @?/rdbms/admin/catnoqm.sql
--安裝XDB
SQL>shutdown immediate
SQL>startup
SQL> @?/rdbms/admin/catqm.sql oracle SYSAUX TEMP YES
SQL> @?/rdbms/admin/utlrp.sql
驗證: XDB 已經正常了:
SQL> set wrap off
SQL> col comp_id for a15
SQL> col version for a15
SQL> col comp_name for a30
SQL> selectcomp_id,comp_name,version,status from dba_registry;
COMP_ID COMP_NAME VERSION STATUS
--------------------------------------------- --------------- -----------------
XDB Oracle XML Database 11.2.0.3.0 VALID
AMD OLAP Catalog 11.2.0.3.0 VALID
EM Oracle Enterprise Manager 11.2.0.3.0 VALID
SDO Spatial 11.2.0.3.0 VALID
ORDIM Oracle Multimedia 11.2.0.3.0 INVALID
CONTEXT Oracle Text 11.2.0.3.0 VALID
ODM Oracle Data Mining 11.2.0.3.0 VALID
EXF Oracle Expression Filter 11.2.0.3.0 VALID
RUL Oracle Rules Manager 11.2.0.3.0 VALID
OWM Oracle Workspace Manager 11.2.0.3.0 VALID
CATALOG Oracle Database Catalog Views 11.2.0.3.0 VALID
CATPROC Oracle Database Packages and T11.2.0.3.0 VALID
JAVAVM JServer JAVA Virtual Machine 11.2.0.3.0 VALID
XML Oracle XDK 11.2.0.3.0 VALID
CATJAVA Oracle Database Java Packages 11.2.0.3.0 VALID
XOQ Oracle OLAP API 11.2.0.3.0 VALID
APS OLAP AnalyticWorkspace 11.2.0.3.0 VALID
17 rows selected.
在次Reload ORDIM組件:
SQL>alter session set current_schema="ORDSYS";
SQL> @?/ord/im/admin/imxreg.sql;
SQL>@?/ord/im/admin/impbs.sql;
SQL> @?/ord/im/admin/impvs.sql;
SQL> @?/ord/im/admin/imtyb.sql;
SQL> @?/ord/im/admin/implb.sql;
SQL> @?/ord/im/admin/imxrepos.sql;
這次一次通過,沒有遇到ORA-31000錯誤。
SQL> selectcomp_id,comp_name,version,status from dba_registry;
COMP_ID COMP_NAME VERSION STATUS
--------------------------------------------- --------------- -----------------
XDB Oracle XML Database 11.2.0.3.0 VALID
AMD OLAP Catalog 11.2.0.3.0 VALID
EM Oracle Enterprise Manager 11.2.0.3.0 VALID
SDO Spatial 11.2.0.3.0 VALID
ORDIM Oracle Multimedia 11.2.0.3.0 VALID
CONTEXT Oracle Text 11.2.0.3.0 VALID
ODM Oracle Data Mining 11.2.0.3.0 VALID
EXF Oracle Expression Filter 11.2.0.3.0 VALID
RUL Oracle Rules Manager 11.2.0.3.0 VALID
OWM Oracle Workspace Manager 11.2.0.3.0 VALID
CATALOG Oracle Database Catalog Views 11.2.0.3.0 VALID
CATPROC Oracle Database Packages and T11.2.0.3.0 VALID
JAVAVM JServer JAVA Virtual Machine 11.2.0.3.0 VALID
XML Oracle XDK 11.2.0.3.0 VALID
CATJAVA Oracle Database JavaPackages 11.2.0.3.0 VALID
XOQ Oracle OLAP API 11.2.0.3.0 VALID
APS OLAP Analytic Workspace 11.2.0.3.0 VALID
17 rows selected.
小結:
(1) 對於XDB 和 ORDIM 組件同時失效的情況下,只能採用reinstall XDB組件,而不能採用Reload XDB組件的方法。 否則在Reload ORDIM 組件的過程中就會遇到ORA-31000的錯誤:
ORA-31000:Resource 'http://xmlns.oracle.com/xdb/acl.xsd' is not an XDB schema document
(2) 不同的Oracle 版本reinstall 和Reload 方法有出入,具體參考:
Oracle XDB 組件 重建 說明
http://blog.csdn.net/tianlesoftware/article/details/7323139
-------------------------------------------------------------------------------------------------------
著作權,文章允許轉載,但必須以連結方式註明源地址,否則追究法律責任!
Skype: tianlesoftware
Email: tianlesoftware@gmail.com
Blog: http://www.tianlesoftware.com
Weibo: http://weibo.com/tianlesoftware
Twitter: http://twitter.com/tianlesoftware
Facebook: http://www.facebook.com/tianlesoftware
Linkedin: http://cn.linkedin.com/in/tianlesoftware
-------加群需要在備忘說明Oracle資料表空間和資料檔案的關係,否則拒絕申請----
DBA1 群:62697716(滿); DBA2 群:62697977(滿) DBA3 群:62697850(滿)
DBA 超級群:63306533(滿); DBA4 群:83829929 DBA5群: 142216823
DBA6 群:158654907 DBA7 群:172855474 DBA總群:104207940