資料泵匯出資料包錯處理

darren__chan發表於2015-10-30

在建立資料庫例項的時候未採用loltp模板,在後期做資料泵備份資料時報錯如下:

oracle@zderpppad01:/home/oracle$expdp \'/ as sysdba\' dumpfile=guijian.dmp logfile guijian.log schemas=guijian


Export: Release 11.2.0.4.0 - Production on Thu May 14 18:11:50 2015


Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.


Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
Starting "SYS"."SYS_EXPORT_SCHEMA_01":  "/******** AS SYSDBA" dumpfile=guijian.dmp logfile guijian.log schemas=guijian 
Estimate in progress using BLOCKS method...
>>> ORA-31642: the following SQL statement fails: 
BEGIN "SYS"."DBMS_CUBE_EXP".SCHEMA_CALLOUT(:1,0,1,'11.02.00.04.00'); END;
ORA-04063: package body "SYS.DBMS_CUBE_EXP" has errors
ORA-06508: PL/SQL: could not find program unit being called: "SYS.DBMS_CUBE_EXP"
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 64 KB
Processing object type SCHEMA_EXPORT/USER
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/ROLE_GRANT
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
ORA-39127: unexpected error from call to export_string :=SYS.DBMS_CUBE_EXP.SCHEMA_INFO_EXP('GUIJIAN',0,1,'11.02.00.04.00',newblock) 
ORA-04063: package body "SYS.DBMS_CUBE_EXP" has errors
ORA-06508: PL/SQL: could not find program unit being called: "SYS.DBMS_CUBE_EXP"
ORA-06512: at line 1
ORA-06512: at "SYS.DBMS_METADATA", line 10256
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
ORA-39127: unexpected error from call to export_string :=SYS.DBMS_CUBE_EXP.INSTANCE_EXTENDED_INFO_EXP('AW$EXPRESS','SYS',1,2,0,'SYS',1,'11.02.00.04.00',newblock) 
ORA-04063: package body "SYS.DBMS_CUBE_EXP" has errors
ORA-06508: PL/SQL: could not find program unit being called: "SYS.DBMS_CUBE_EXP"
ORA-06512: at line 1
ORA-06512: at "SYS.DBMS_METADATA", line 9926
ORA-39127: unexpected error from call to export_string :=SYS.DBMS_CUBE_EXP.INSTANCE_EXTENDED_INFO_EXP('AW$AWMD','SYS',1,2,0,'SYS',1,'11.02.00.04.00',newblock) 
ORA-04063: package body "SYS.DBMS_CUBE_EXP" has errors
ORA-06508: PL/SQL: could not find program unit being called: "SYS.DBMS_CUBE_EXP"
ORA-06512: at line 1
ORA-06512: at "SYS.DBMS_METADATA", line 9926
ORA-39127: unexpected error from call to export_string :=SYS.DBMS_CUBE_EXP.INSTANCE_EXTENDED_INFO_EXP('AW$AWCREATE','SYS',1,2,0,'SYS',1,'11.02.00.04.00',newblock) 
ORA-04063: package body "SYS.DBMS_CUBE_EXP" has errors
ORA-06508: PL/SQL: could not find program unit being called: "SYS.DBMS_CUBE_EXP"
ORA-06512: at line 1
ORA-06512: at "SYS.DBMS_METADATA", line 9926
ORA-39127: unexpected error from call to export_string :=SYS.DBMS_CUBE_EXP.INSTANCE_EXTENDED_INFO_EXP('AW$AWCREATE10G','SYS',1,2,0,'SYS',1,'11.02.00.04.00',newblock) 
ORA-04063: package body "SYS.DBMS_CUBE_EXP" has errors
ORA-06508: PL/SQL: could not find program unit being called: "SYS.DBMS_CUBE_EXP"
ORA-06512: at line 1
ORA-06512: at "SYS.DBMS_METADATA", line 9926
ORA-39127: unexpected error from call to export_string :=SYS.DBMS_CUBE_EXP.INSTANCE_EXTENDED_INFO_EXP('AW$AWXML','SYS',1,2,0,'SYS',1,'11.02.00.04.00',newblock) 
ORA-04063: package body "SYS.DBMS_CUBE_EXP" has errors
ORA-06508: PL/SQL: could not find program unit being called: "SYS.DBMS_CUBE_EXP"
ORA-06512: at line 1
ORA-06512: at "SYS.DBMS_METADATA", line 9926
ORA-39127: unexpected error from call to export_string :=SYS.DBMS_CUBE_EXP.INSTANCE_EXTENDED_INFO_EXP('AW$AWREPORT','SYS',1,2,0,'SYS',1,'11.02.00.04.00',newblock) 
ORA-04063: package body "SYS.DBMS_CUBE_EXP" has errors
ORA-06508: PL/SQL: could not find program unit being called: "SYS.DBMS_CUBE_EXP"
ORA-06512: at line 1
ORA-06512: at "SYS.DBMS_METADATA", line 9926
Processing object type SCHEMA_EXPORT/TABLE/TABLE
ORA-39127: unexpected error from call to export_string :=SYS.DBMS_CUBE_EXP.INSTANCE_EXTENDED_INFO_EXP('AW$EXPRESS','SYS',1,2,1,'SYS',1,'11.02.00.04.00',newblock) 
ORA-04063: package body "SYS.DBMS_CUBE_EXP" has errors
ORA-06508: PL/SQL: could not find program unit being called: "SYS.DBMS_CUBE_EXP"
ORA-06512: at line 1
ORA-06512: at "SYS.DBMS_METADATA", line 9926
ORA-39127: unexpected error from call to export_string :=SYS.DBMS_CUBE_EXP.INSTANCE_EXTENDED_INFO_EXP('AW$AWMD','SYS',1,2,1,'SYS',1,'11.02.00.04.00',newblock) 
ORA-04063: package body "SYS.DBMS_CUBE_EXP" has errors
ORA-06508: PL/SQL: could not find program unit being called: "SYS.DBMS_CUBE_EXP"
ORA-06512: at line 1
ORA-06512: at "SYS.DBMS_METADATA", line 9926
ORA-39127: unexpected error from call to export_string :=SYS.DBMS_CUBE_EXP.INSTANCE_EXTENDED_INFO_EXP('AW$AWCREATE','SYS',1,2,1,'SYS',1,'11.02.00.04.00',newblock) 
ORA-04063: package body "SYS.DBMS_CUBE_EXP" has errors
ORA-06508: PL/SQL: could not find program unit being called: "SYS.DBMS_CUBE_EXP"
ORA-06512: at line 1
ORA-06512: at "SYS.DBMS_METADATA", line 9926
ORA-39127: unexpected error from call to export_string :=SYS.DBMS_CUBE_EXP.INSTANCE_EXTENDED_INFO_EXP('AW$AWCREATE10G','SYS',1,2,1,'SYS',1,'11.02.00.04.00',newblock) 
ORA-04063: package body "SYS.DBMS_CUBE_EXP" has errors
ORA-06508: PL/SQL: could not find program unit being called: "SYS.DBMS_CUBE_EXP"
ORA-06512: at line 1
ORA-06512: at "SYS.DBMS_METADATA", line 9926
ORA-39127: unexpected error from call to export_string :=SYS.DBMS_CUBE_EXP.INSTANCE_EXTENDED_INFO_EXP('AW$AWXML','SYS',1,2,1,'SYS',1,'11.02.00.04.00',newblock) 
ORA-04063: package body "SYS.DBMS_CUBE_EXP" has errors
ORA-06508: PL/SQL: could not find program unit being called: "SYS.DBMS_CUBE_EXP"
ORA-06512: at line 1
ORA-06512: at "SYS.DBMS_METADATA", line 9926
ORA-39127: unexpected error from call to export_string :=SYS.DBMS_CUBE_EXP.INSTANCE_EXTENDED_INFO_EXP('AW$AWREPORT','SYS',1,2,1,'SYS',1,'11.02.00.04.00',newblock) 
ORA-04063: package body "SYS.DBMS_CUBE_EXP" has errors
ORA-06508: PL/SQL: could not find program unit being called: "SYS.DBMS_CUBE_EXP"
ORA-06512: at line 1
ORA-06512: at "SYS.DBMS_METADATA", line 9926
ORA-39127: unexpected error from call to export_string :=SYS.DBMS_CUBE_EXP.SCHEMA_INFO_EXP('GUIJIAN',1,1,'11.02.00.04.00',newblock) 
ORA-04063: package body "SYS.DBMS_CUBE_EXP" has errors
ORA-06508: PL/SQL: could not find program unit being called: "SYS.DBMS_CUBE_EXP"
ORA-06512: at line 1
ORA-06512: at "SYS.DBMS_METADATA", line 10256
. . exported "GUIJIAN"."GUIJIAN"                         13.00 KB      21 rows
>>> ORA-31642: the following SQL statement fails: 
BEGIN "SYS"."DBMS_CUBE_EXP".SCHEMA_CALLOUT(:1,1,1,'11.02.00.04.00'); END;
ORA-04063: package body "SYS.DBMS_CUBE_EXP" has errors
ORA-06508: PL/SQL: could not find program unit being called: "SYS.DBMS_CUBE_EXP"
Master table "SYS"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded
******************************************************************************
Dump file set for SYS.SYS_EXPORT_SCHEMA_01 is:
  /oracle/app/11.2.0/db_2/rdbms/log/guijian.dmp
Job "SYS"."SYS_EXPORT_SCHEMA_01" completed with 14 error(s) at Thu May 14 18:11:58 2015 elapsed 0 00:00:07


oracle@zderpppad01:/home/oracle$
oracle@zderpppad01:/home/oracle$
oracle@zderpppad01:/home/oracle$
oracle@zderpppad01:/home/oracle$cd /backup/dump
oracle@zderpppad01:/backup/dump$ls
MIXCRMDB_fullbak_20150514_1806.dmp  MIXCRMDB_fullbak_20150514_1806.log
oracle@zderpppad01:/backup/dump$rm -rf ./*
oracle@zderpppad01:/backup/dump$expdp \'/ as sysdba\' dumpfile=guijian.dmp logfile guijian.log schemas=guijian


Export: Release 11.2.0.4.0 - Production on Thu May 14 18:19:44 2015


Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.


Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
ORA-39001: invalid argument value
ORA-39000: bad dump file specification
ORA-31641: unable to create dump file "/oracle/app/11.2.0/db_2/rdbms/log/guijian.dmp"
ORA-27038: created file already exists
Additional information: 1




oracle@zderpppad01:/backup/dump$expdp \'/ as sysdba\' dumpfile=guijian.dmp logfile guijian.log schemas=guijian directory=dump


Export: Release 11.2.0.4.0 - Production on Thu May 14 18:20:02 2015


Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.


Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
Starting "SYS"."SYS_EXPORT_SCHEMA_01":  "/******** AS SYSDBA" dumpfile=guijian.dmp logfile guijian.log schemas=guijian directory=dump 
Estimate in progress using BLOCKS method...
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 64 KB
Processing object type SCHEMA_EXPORT/USER
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/ROLE_GRANT
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/TABLE/TABLE
. . exported "GUIJIAN"."GUIJIAN"                         13.00 KB      21 rows
Master table "SYS"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded
******************************************************************************
Dump file set for SYS.SYS_EXPORT_SCHEMA_01 is:
  /backup/dump/guijian.dmp
Job "SYS"."SYS_EXPORT_SCHEMA_01" successfully completed at Thu May 14 18:20:07 2015 elapsed 0 00:00:04

處理方法:
OLAP objects remain existing in data dictionary while OLAP is not installed or was de-installed. Verify with:
connect / as sysdba
SELECT * FROM SYS.EXPPKGACT$ WHERE PACKAGE = 'DBMS_CUBE_EXP';
SOLUTION

Perform the following:
sqlplus / as sysdba

-- backup the table SYS.EXPPKGACT$ before deleting the row
SQL> CREATE TABLE SYS.EXPPKGACT$_BACKUP AS SELECT * FROM SYS.EXPPKGACT$;

-- delete the DBMS_CUBE_EXP from the SYS.EXPPKGACT$
SQL> DELETE FROM SYS.EXPPKGACT$ WHERE PACKAGE = 'DBMS_CUBE_EXP' AND SCHEMA= 'SYS';
SQL> COMMIT;

Run EXPDP command again.
操作如下:
SQL> SELECT * FROM SYS.EXPPKGACT$ WHERE PACKAGE = 'DBMS_CUBE_EXP';


PACKAGE                        SCHEMA                              CLASS
------------------------------ ------------------------------ ----------
    LEVEL#
----------
DBMS_CUBE_EXP                  SYS                                     2
      1050


DBMS_CUBE_EXP                  SYS                                     4
      1050


DBMS_CUBE_EXP                  SYS                                     6
      1050




SQL> CREATE TABLE SYS.EXPPKGACT$_BACKUP AS SELECT * FROM SYS.EXPPKGACT$;


Table created.


SQL> DELETE FROM SYS.EXPPKGACT$ WHERE PACKAGE = 'DBMS_CUBE_EXP' AND SCHEMA= 'SYS';


3 rows deleted.


SQL> commit;


Commit complete.


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29863023/viewspace-1819117/,如需轉載,請註明出處,否則將追究法律責任。

相關文章