新安装的XDB组件状态是INVALID的,报下面的错:

SQL> set echo on
SQL> -- @catqm.sql    
SQL>
SQL> @?/rdbms/admin/catqm xdbpwd XDB TEMP NO
SQL> Rem
...
...

SQL> declare
  2    ACLXSD BFILE := dbms_metadata_hack.get_bfile('acl.xsd.11.2');
  3    ACLURL VARCHAR2(2000) := 'http://xmlns.oracle.com/xdb/acl.xsd';
  4  begin
  5  xdb.dbms_xmlschema.registerSchema(ACLURL, ACLXSD, FALSE, FALSE, FALSE, TRUE,
  6                                    FALSE, 'XDB',
  7                                   options => DBMS_XMLSCHEMA.REGISTER_BINARYXML);
  8  
  9  end;
 10  /
declare
*
ERROR at line 1:
ORA-31084: error while creating table "XDB"."XDB$ACL" for element "acl"
ORA-43853: SECUREFILE lobs cannot be used in non-ASSM tablespace "XDB"
ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 37
ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 65
ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 136
ORA-06512: at line 5

SQL> 
SQL> -- Disable XRLS hierarchy priv check for xdb$acl and xdb$schema tables
SQL> BEGIN
  2     xdb.dbms_xdbz.disable_hierarchy('XDB', 'XDB$ACL');
  3     xdb.dbms_xdbz.disable_hierarchy('XDB', 'XDB$SCHEMA');
  4  END;
  5  /
BEGIN
*
ERROR at line 1:
ORA-31061: XDB error: DBMS_XDBZ.DISABLE_HIERARCHY
ORA-06512: at "XDB.DBMS_XDBZ0", line 131
ORA-06512: at "XDB.DBMS_XDBZ0", line 802
ORA-29329: Table not of type XMLType
ORA-06512: at "XDB.DBMS_XDBZ", line 66
ORA-06512: at line 2

SQL> -- INSERT bootstrap AND root acl's
SQL> DECLARE
  2    b_abspath          VARCHAR2(200);
  3    b_data             VARCHAR2(2000);
...
 99     retbool := dbms_xdb.createresource(ro_abspath, ro_data);
100  END;
101  /
DECLARE
*
ERROR at line 1:
ORA-31114: XDB configuration has been deleted or is corrupted
ORA-06512: at "XDB.DBMS_XDB", line 174
ORA-06512: at line 96

...

查了MOS:

If COMPATIBLE is set to 11.2 or higher, XDB installation defaults to SecureFiles for XMLType storage regardless of the value of the 4th argument passed to catqm.sql (YES OR NO).

在11.2版本后,默认的表空间segment_space_management为AUTO

SQL> select tablespace_name, extent_management, segment_space_management
  2  from dba_tablespaces;

TABLESPACE_NAME EXTENT_MAN SEGMEN
--------------- ---------- ------
SYSTEM          LOCAL      MANUAL
SYSAUX          LOCAL      AUTO
UNDOTBS1        LOCAL      MANUAL
TEMP            LOCAL      MANUAL
USERS           LOCAL      AUTO
XDB             LOCAL      MANUAL

6 rows selected.

SQL> @?/rdbms/admin/catqm xdbpwd SYSAUX TEMP NO