数据泵导出数据报错处理

在创建数据库实例的时候未采用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/28612416/viewspace-1655056/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/28612416/viewspace-1655056/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
导出Hive表数据时出现错的原因可能是由于无法将源数据从HDFS移动到目标目录导致的。根据引用中的错误信息,错信息显示"Unable to move source",并提到了源路径和目标路径。这表明在执行任务时,将数据从源路径移动到目标路径时遇到了问题。 根据引用中提供的代码,导出Hive表数据的语句是使用"insert overwrite local directory"的方式。该语句将表中的数据插入到指定的本地目录中。然而,由于无法将数据从HDFS移动到本地目录,导致了错。 可能的原因之一是目标目录不存在或是没有足够的权限进行写入操作。你可以确认一下目标目录"/data/hive/out"是否存在,并且对于当前用户是否具有写入权限。 另外一个可能的原因是源数据在HDFS上的路径无效或不可访问。你可以检查一下源数据路径"hdfs://node1:8020/tmp/hive/hadoop/e1f5e71d-375d-4393-a07c-fe44a4a77626/hive_2022-07-21_22-18-53_655_4722056337462286090-1/-mr-10000"是否正确,并且确保你有访问该路径的权限。 如果以上两个原因都不是问题所在,还有可能是由于其他配置或环境问题导致的。你可以检查一下相关的配置文件,如Hadoop、Hive和Spark的配置文件,确保它们的配置正确并且与集群环境匹配。 综上所述,当导出Hive表数据错时,你可以检查以下几个方面: 1. 确认目标目录是否存在并且对于当前用户具有写入权限; 2. 检查源数据在HDFS上的路径是否正确并且你具有访问权限; 3. 检查相关配置文件的配置是否正确并且与集群环境匹配。 希望以上信息对你有帮助。如果还有其他问题,请随时提问。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值