昨天payment从测试库到另外一个测试库进行迁移导出时出现如下故障
[oracle@oracle ~]$ exp userid=test/test file=testdmp buffer= owner=test
Export: Release Production on Tue Nov ::
Copyright (c) Oracle All rights reserved
Connected to: Oracle Database g Enterprise Edition Release bit Production
With the Partitioning Real Application Clusters OLAP and Data Mining options
Export done in ZHSGBK character set and ALUTF NCHAR character set
About to export specified users
EXP: ORACLE error encountered
ORA: inconsistent datatypes: expected BLOB CLOB got CHAR
EXP: Export terminated unsuccessfully
原因数据字典中有存在一些无效KU$_视图
SQL> select * from sysku$_xmlschema_view;
select * from sysku$_xmlschema_view
*
ERROR at line :
ORA: inconsistent datatypes: expected BLOB CLOB got CHAR
解决办法
执行对象视图定义脚本 $ORACLE_HOME/rdbms/admin/catmetxsql
SQL> @?/rdbms/admin/catmetxsql
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
执行重新编译无效对象脚本 $ORACLE_HOME/rdbms/admin/utlrpsql
SQL> @?/rdbms/admin/utlrpsql
PL/SQL procedure successfully completed
PL/SQL procedure successfully completed
验证一下程序
SQL> select * from ku$_xmlschema_view;
V V OWNER_NUM OWNER_NAME URL
MDSYS
MDSYS
MDSYS
重新执行导出程序exp一些正常