首页 » ORACLE 9i-23c » exp EXP-00056 ora-00932 导出异常

exp EXP-00056 ora-00932 导出异常

今天在测试库上导出遇到了这个错误
OS:RHEL
DB\client version:10201

[oracle@dev-db backup]$ exp icme3/icme3 file=icme3_20120409.dmp
Export: Release 10.2.0.1.0 - Production on Mon Apr 9 16:54:36 2012
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
Export done in ZHS16GBK character set and AL16UTF16 NCHAR character set
. exporting pre-schema procedural objects and actions
. exporting foreign function library names for user ICME3
. exporting PUBLIC type synonyms
. exporting private type synonyms
. exporting object type definitions for user ICME3
About to export ICME3's objects ...
. exporting database links
. exporting sequence numbers
. exporting cluster definitions
EXP-00056: ORACLE error 932 encountered
ORA-00932: inconsistent datatypes: expected BLOB, CLOB got CHAR
EXP-00000: Export terminated unsuccessfully

Cause:
One possible cause (note there might be others):
Script $ORACLE_HOME/rdbms/admin/catmeta.sql has been run recently.

SQL> SELECT url, local, stripped_val
  2    FROM sys.ku$_xmlschema_view;
SELECT url, local, stripped_val
                   *
ERROR at line 1:
ORA-00932: inconsistent datatypes: expected BLOB, CLOB got CHAR
一种方法是用EXPDP
另一种方法
For reasons having to do with compatibility, the XDB objects cannot be created by the catproc.sql script. The script catproc.sql therefore calls the catmeta.sql script, which contains fake object views for XDB objects.
The real object views are defined in the catmetx.sql script (this script is invoked by catxdbv.sql which is invoked by catqm.sql).
SQL> conn / as sysdba
Connected.
SQL> @?/rdbms/admin/catmetx.sql
Package altered.
Index altered.
View created.
Grant succeeded.
View created.
Grant succeeded.
Procedure created.
System altered.
System altered.
System altered.
PL/SQL procedure successfully completed.
Procedure dropped.
SQL> @?/rdbms/admin/utlrp.sql
TIMESTAMP
------------------------------------------------------------------------------------------------------------------------------------------------------
COMP_TIMESTAMP UTLRP_BGN  2012-04-09 17:14:19
DOC>   The following PL/SQL block invokes UTL_RECOMP to recompile invalid
DOC>   objects in the database. Recompilation time is proportional to the
DOC>   number of invalid objects in the database, so this command may take
DOC>   a long time to execute on a database with a large number of invalid
DOC>   objects.
DOC>
DOC>   Use the following queries to track recompilation progress:
DOC>
DOC>   1. Query returning the number of invalid objects remaining. This
DOC>      number should decrease with time.
DOC>         SELECT COUNT(*) FROM obj$ WHERE status IN (4, 5, 6);
DOC>
DOC>   2. Query returning the number of objects compiled so far. This number
DOC>      should increase with time.
DOC>         SELECT COUNT(*) FROM UTL_RECOMP_COMPILED;
DOC>
DOC>   This script automatically chooses serial or parallel recompilation
DOC>   based on the number of CPUs available (parameter cpu_count) multiplied
DOC>   by the number of threads per CPU (parameter parallel_threads_per_cpu).
DOC>   On RAC, this number is added across all RAC nodes.
DOC>
DOC>   UTL_RECOMP uses DBMS_SCHEDULER to create jobs for parallel
DOC>   recompilation. Jobs are created without instance affinity so that they
DOC>   can migrate across RAC nodes. Use the following queries to verify
DOC>   whether UTL_RECOMP jobs are being created and run correctly:
DOC>
DOC>   1. Query showing jobs created by UTL_RECOMP
DOC>         SELECT job_name FROM dba_scheduler_jobs
DOC>            WHERE job_name like 'UTL_RECOMP_SLAVE_%';
DOC>
DOC>   2. Query showing UTL_RECOMP jobs that are running
DOC>         SELECT job_name FROM dba_scheduler_running_jobs
DOC>            WHERE job_name like 'UTL_RECOMP_SLAVE_%';
DOC>#
PL/SQL procedure successfully completed.
TIMESTAMP
------------------------------------------------------------------------------------------------------------------------------------------------------
COMP_TIMESTAMP UTLRP_END  2012-04-09 17:14:30
PL/SQL procedure successfully completed.
DOC> The following query reports the number of objects that have compiled
DOC> with errors (objects that compile with errors have status set to 3 in
DOC> obj$). If the number is higher than expected, please examine the error
DOC> messages reported with each object (using SHOW ERRORS) to see if they
DOC> point to system misconfiguration or resource constraints that must be
DOC> fixed before attempting to recompile these objects.
DOC>#
OBJECTS WITH ERRORS
-------------------
                116
DOC> The following query reports the number of errors caught during
DOC> recompilation. If this number is non-zero, please query the error
DOC> messages in the table UTL_RECOMP_ERRORS to see if any of these errors
DOC> are due to misconfiguration or resource constraints that must be
DOC> fixed before objects can compile successfully.
DOC>#
ERRORS DURING RECOMPILATION
---------------------------
                         78
FAILED CHECK FOR PACKAGE DRIPARX
ORDIM INVALID OBJECTS: ORDIMG_PKG - 6 - 9
ORDIM INVALID OBJECTS: ORDIMAGE - 6 - 14
ORDIM INVALID OBJECTS: ORDIMAGESIGNATURE - 6 - 14
ORDIM INVALID OBJECTS: ORDIMGIDXMETHODS - 5 - 14
ORDIM INVALID OBJECTS: ORDIMAGEINDEXSTATS - 6 - 14
ORDIM INVALID OBJECTS: SI_STILLIMAGE - 6 - 14
ORDIM INVALID OBJECTS: ORDDOC - 6 - 14
ORDIM INVALID OBJECTS: ORDIMG_PKG - 6 - 11
ORDIM INVALID OBJECTS: SCOREFUNC - 6 - 8
ORDIM INVALID OBJECTS: SIMILARFUNC - 6 - 8
ORDIM INVALID OBJECTS: IMGSIMILAR - 6 - 33
ORDIM INVALID OBJECTS: IMGSCORE - 6 - 33
ORDIM INVALID OBJECTS: ORDIMAGEINDEX - 6 - 32
ORDIM INVALID OBJECTS: ORDIMGSI_PKG - 6 - 11
PL/SQL procedure successfully completed.

SQL> SELECT count(*)  FROM sys.ku$_xmlschema_view;                                                                                                                               

  COUNT(*)
----------
        25

SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options

[oracle@dev-db backup]$ exp icme3/icme3 file=icme3_20120409.dmp
Export: Release 10.2.0.1.0 - Production on Mon Apr 9 17:14:57 2012
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
Export done in ZHS16GBK character set and AL16UTF16 NCHAR character set
. exporting pre-schema procedural objects and actions
. exporting foreign function library names for user ICME3
. exporting PUBLIC type synonyms
. exporting private type synonyms
. exporting object type definitions for user ICME3
About to export ICME3's objects ...
. exporting database links
. exporting sequence numbers
. exporting cluster definitions
. about to export ICME3's tables via Conventional Path ...
. . exporting table                  ADD_CME_SCORE        118 rows exported
. . exporting table        ADD_ICME_IMPORT_PROJECT          0 rows exported
。。。
. exporting refresh groups and children
. exporting dimensions
. exporting post-schema procedural objects and actions
. exporting statistics
Export terminated successfully without warnings.

--顺利完成
BUG:4685068 10.2.0.1

note:因为一些xdb对象无效和sys视图未创建,解决方案1用数据泵expdp,方案2用sys执行catmetx.sql和utlrp.sql重新编译无效对象

打赏

对不起,这篇文章暂时关闭评论。