zoukankan      html  css  js  c++  java
  • Oracle ORA31000: Resource 'http://xmlns.oracle.com/xdb/acl.xsd' is not an XDB schema 解决方法


    数据库是从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

  • 相关阅读:
    将帅问题
    堆栈(链栈)
    堆栈(基础实现原理 顺序栈)
    双向链表
    冒泡排序 (泛型版)
    maven
    jboss数据源配置
    仓库介绍,nexus的安装
    mave聚合继承
    mac mysql 安装
  • 原文地址:https://www.cnblogs.com/tianlesoftware/p/3609341.html
Copyright © 2011-2022 走看看