记一次expdp错误

话说导数据expdp比exp效率多了,原因很简单,exp是通过BUFFER CACHE的SQL导出到exp文件的,但是expdp则不是,他不通过BUFFER CACHE,而是直接导出到文件的,而且只能在服务端,所以不受网络的影响。

建好相关目录后,就开始动工导数据了,但是出现错误了

expdp mrpmusic/mrpmusic dumpfile=mrpmusic.dmp directory=mrpmusic_exp
ORA-39006: internal error
ORA-39065: unexpected master process exception in DISPATCH
ORA-01403: no data found

ORA-39097: Data Pump job encountered unexpected error 100

完了查了下metalink

Data Pump Export Started Failing After Applying CPU Patch [ID 453796.1]这篇文章

上面说是运行两个脚本

sqlplus / as sysdba
$ORACLE_HOME/rdbms/admin/catmet2.sql
$ORACLE_HOME/rdbms/admin/utlrp.sql

执行后,又有新错误

ORA-39125: Worker unexpected fatal error in KUPW$WORKER.UNLOAD_METADATA while calling DBMS_METADATA.FETCH_XML_CLOB [PROCACT_SCHEMA:”MRPMUSIC”]
ORA-04063: view “SYS.KU$_CLUSTER_VIEW” has errors

ORA-06512: at “SYS.DBMS_SYS_ERROR”, line 105
ORA-06512: at “SYS.KUPW$WORKER”, line 6313

继续查看了一下 ID 742018.1

解决方案:

1
2
3
4
5
6
7
8
9
10
11
12
13
cd $ORACLE_HOME/rdbms/admin
SQL> startup restrict
SQL> select count(*) from dba_objects where status='INVALID';
SQL> @catalog
SQL> @catproc
SQL> @utlrp <== To compile the invalid objects
SQL> select count(*) from dba_objects where status='INVALID';
col comp_id for a12
col comp_name for a30
col version for a12
select comp_id, comp_name, version, status from dba_registry;
SQL> shutdown immediate
SQL> startup

需要重启数据库,我就不往下继续了。由于版本不同,无法向下兼容,还是老实用低版本的EXP出来

你活着,证明了什么?