在新安装XDB后,一些对象为失效

SQL> select comp_name, version, status from dba_registry;

COMP_NAME                          VERSION                 STATUS
---------------------------------- ----------------------- ----------
Oracle XML Database                11.2.0.2.0              INVALID
Oracle Database Catalog Views      11.2.0.2.0              VALID
Oracle Database Packages and Types 11.2.0.2.0              VALID
JServer JAVA Virtual Machine       11.2.0.2.0              VALID
Oracle XDK                         11.2.0.2.0              VALID
Oracle Database Java Packages      11.2.0.2.0              VALID

SQL> select object_type,object_name, owner from dba_objects
 where status ='INVALID' and
 owner in ('SYS','SYSTEM','XDB')
 order by owner, object_name, object_type;

OBJECT_TYPE         OBJECT_NAME                    OWNER
------------------- ------------------------------ --------
PACKAGE BODY        DBMS_METADATA                  SYS
PACKAGE BODY        DBMS_NETWORK_ACL_ADMIN         SYS
PACKAGE BODY        DBMS_XS_PRINCIPAL_EVENTS_INT   SYS
PACKAGE BODY        XS$CATVIEW_UTIL                SYS
PACKAGE BODY        DBMS_CSX_INT                   XDB
PACKAGE BODY        DBMS_RESCONFIG                 XDB
PACKAGE BODY        DBMS_XDB                       XDB
PACKAGE BODY        DBMS_XDBRESOURCE               XDB
PACKAGE BODY        DBMS_XDBUTIL_INT               XDB
PACKAGE BODY        DBMS_XDBZ0                     XDB
PACKAGE BODY        DBMS_XMLDOM                    XDB
PACKAGE BODY        DBMS_XMLPARSER                 XDB
PACKAGE BODY        DBMS_XMLSCHEMA                 XDB
PACKAGE BODY        DBMS_XSLPROCESSOR              XDB
PACKAGE BODY        XIMETADATA_PKG                 XDB

15 rows selected.

SQL> select owner, schema_url
 from dba_xml_schemas
 order by 1,2;

OWNER    SCHEMA_URL
-------- ----------------------------------------------------------
XDB      http://xmlns.oracle.com/xdb/XDBResource.xsd
XDB      http://xmlns.oracle.com/xdb/XDBSchema.xsd

2 rows selected.

SQL> select any_path from resource_view;
ERROR:
ORA-01002: fetch out of sequence

 

MOS:

SOLUTION

To implement the solution, please execute the following steps:

– Disable "password complexity verification" feature
 

SQL> connect / as sysdba

 

drop function verify_function;
ALTER PROFILE DEFAULT LIMIT PASSWORD_VERIFY_FUNCTION null;


– Grant execute permissions on DBMS_SQL, DBMS_LOB, UTL_FILE to PUBLIC or XDB user
 

SQL> connect / as sysdba

 

grant execute on dbms_sql to xdb;
grant execute on dbms_lob to xdb;
grant execute on utl_file to xdb;


– Reload (using xdbrelod.sql) or Reinstall (deinstall and install) XML DB following the steps from Note 1292089.1
– Finally, if required, run utlrp.sql:
 

SQL> @?/rdbms/admin/utlrp.sql


XML DB and all SYS objects are valid now:
 

SQL> select comp_name, version, status from dba_registry;

 

COMP_NAME                          VERSION                 STATUS
———————————- ———————– ———-
Oracle XML Database                11.2.0.2.0              VALID
Oracle Database Catalog Views      11.2.0.2.0              VALID
Oracle Database Packages and Types 11.2.0.2.0              VALID
JServer JAVA Virtual Machine       11.2.0.2.0              VALID
Oracle XDK                         11.2.0.2.0              VALID
Oracle Database Java Packages      11.2.0.2.0              VALID

SQL> select object_type,object_name, owner from dba_objects
where status ='INVALID' and
owner in ('SYS','SYSTEM','XDB')
order by owner, object_name, object_type;

no rows selected.

 

原创文章,转载请注明: 转载自ORADBCA

本文链接地址: XDB is INVALID in DBA_REGISTRY after Fresh Installation

36.3K