使用数据泵(expdp)导数时遇到了ORA-31626 & ORA-00942 错误,数据库版本为Oracle Database 10g Release 10.2.0.5.0,具体错误如下所示:

$ expdp system/xxx tables=xxx.xxx directory=DUMPDIR dumpfile=xxxx.dmp logfile=xxx.log;

 

Export: Release 10.2.0.5.0 - 64bit Production on Saturday, 27 July, 2019 10:39:07

 

Copyright (c) 2003, 2007, Oracle.  All rights reserved.

 

Connected to: Oracle Database 10g Release 10.2.0.5.0 - 64bit Production

ORA-31626: job does not exist

ORA-00942: table or view does not exist

ORA-00942: table or view does not exist

ORA-00942: table or view does not exist

ORA-00942: table or view does not exist

ORA-00942: table or view does not exist

ORA-00942: table or view does not exist

ORA-00942: table or view does not exist

ORA-00942: table or view does not exist

ORA-00942: table or view does not exist

ORA-00942: table or view does not exist

ORA-00942: table or view does not exist

ORA-00942: table or view does not exist

检查验证发现表确实是存在的,搜索metalink,发现官方文档有介绍:“DataPump Export (EXPDP) Reports ORA-942 Even If Table Exists (Doc ID 1371613.1)”,下面的的操作步骤基本按照官方文档的介绍处理:

在数据库开启跟踪

SQL> alter system set events '942 trace name errorstack level 3';

System altered.

然后使用expdp命令导数

在数据库关闭跟踪

SQL> alter system set events '942 trace name errorstack off';

System altered.

检查告警日志,就能发现对应的跟踪文件,如下所示:

Errors in file /u01/app/oracle/admin/epps/udump/epps_ora_15524.trc:

ORA-00942: table or view does not exist

Sat Jul 27 10:39:08 CST 2019

The value (30) of MAXTRANS parameter ignored.

在跟踪文件,我们会发现PL/SQL Call Stack信息。这个跟官方文档的内容有所差别,这个也正常,一模一样的错误信息还是很少见的。

 

 

根据官方文档提示, 这个是因为DataPump内部包损坏了(damaged DataPump internal package),如果查单纯看包'DBMS_DATAPUMP',发现其状态是VALID,对这些没有多少研究。所以不清楚更深一层次的原因!

SQL> select owner

  2      , object_name

  3      , object_type

  4      , status 

  5  from  dba_objects where object_name='DBMS_DATAPUMP';

 

OWNER                          OBJECT_NAME              OBJECT_TYPE         STATUS

------------------------------ ------------------------ ------------------- -------

SYS                            DBMS_DATAPUMP            PACKAGE             VALID

SYS                            DBMS_DATAPUMP            PACKAGE BODY        VALID

PUBLIC                         DBMS_DATAPUMP            SYNONYM             VALID

 

SQL> 

 

官方文档"How To Reload Datapump Utility EXPDP/IMPDP (文档 ID 430221.1)"给出了如何解决这个问题(个人根据下面步骤解决了这个问题):

NOTE:
For running catproc.sql, please refer to
Note 863312.1 - Best Practices for running catalog, catproc and utlrp script

  • The catalog or catproc script should be run after the database has been opened with startup migrate or startup upgrade depending on version.
  • The catalog and catproc script should not be run when the database is opened with unrestricted access.?
    This can cause the database to experience performance issues and can even lead to a hanging situation.

In some cases DataPump utility may get corrupted and we need to recreate DataPump utility to overcome internal corruption. To do this, run specified scripts for Oracle version that you are running as given below.

Note:  Run the following as sysdba user:

SQL> connect / as sysdba

For Oracle version 10.1 :

-- 1. Catdp.sql orders the installation of all its components including the Metadata API which was previously installed separately. By default catproc.sql invoke this script.

SQL> @$ORACLE_HOME/rdbms/admin/catdp.sql

-- 2. dbmspump.sql will create DBMS procedures for dataPUMP

SQL> @$ORACLE_HOME/rdbms/admin/dbmspump.sql

For Oracle version 10.2:

-- 1.Catdph.sql will Re-Install DataPump types and views

SQL> @$ORACLE_HOME/rdbms/admin/catdph.sql

-- Note:
-- If XDB is installed, then it is required to run "catmetx.sql" script also.
-- Use this code to verify if XDB is installed:

SQL> select substr(comp_name,1,30) comp_name,
     substr(comp_id,1,10) comp_id,
     substr(version,1,12) version,
     status
     from dba_registry;

-- Sample output if XDB installed,
Oracle XML Database    XDB    -version-    VALID

-- 2.prvtdtde.plb will re-install tde_library packages

SQL> @$ORACLE_HOME/rdbms/admin/prvtdtde.plb

-- 3. Catdpb.sql will Re-Install DataPump packages

SQL> @$ORACLE_HOME/rdbms/admin/catdpb.sql

-- 4.Dbmspump.sql will Re-Install DBMS DataPump objects

SQL> @$ORACLE_HOME/rdbms/admin/dbmspump.sql

-- 5. To recompile  invalid objects, if any

SQL> @$ORACLE_HOME/rdbms/admin/utlrp.sql

For Oracle version 11g and higher prior to 12c:

-- 1.Catproc.sql

SQL> @$ORACLE_HOME/rdbms/admin/catproc.sql

-- 2.To recompile invalid objects, if any

SQL> @$ORACLE_HOME/rdbms/admin/utlrp.sql

For Oracle version 12c:

Note 1: Prior rebuilding DP catalog in 12.1.0.2 CDB , install?Patch 25139545 as alerted in?Document 2175021.1 - "Alert - Multitenant Customers: The objects created by the post-install steps of 12.1.0.2 Generic DataPump Patches Are not Shared Across All PDBS".

Note 2: For issues regarding KU$ Invalid Objects Owned by SYS after upgrading or applying datapatch, refer to?Document 2289785.1 to rebuild Datapump.

Rebuild the DataPump packages with the following steps.

Under the ORACLE_HOME, execute:
cd rdbms/admin

-- run the dpload.sql in the CDB with all of the PDBs open

From a SQL*Plus session, connect as sysdba

and then run dpload.sql:

@dpload.sql

on the affected database.

Note: If DataPump catalog is not valid in a PDB, same step should be executed to validate the DP catalog on a pluggable database.

Additional Resources

Community: Database Utilities

Still have questions? Use the above community to search for similar discussions or start a new discussion on this subject.

 

参考资料:

DataPump Export (EXPDP) Reports ORA-942 Even If Table Exists (Doc ID 1371613.1)

How To Reload Datapump Utility EXPDP/IMPDP (文档 ID 430221.1)

EXPDP导数报ORA-00942案例的更多相关文章

  1. plsql 连接oralce数据库,报ora 12557 tns 协议适配器不可加载错误

    使用plsql 连接oracle 数据库报ora 12557 错误: 解决方案: 1:首先确保服务中的service以及监听器都开启 2:F:\app\Administrator\product\11 ...

  2. PLSQL登录数据库 报ORA -12154的诡异问题

    https://q.cnblogs.com/q/89420/ 现象: 1.机器上先后安装了oracle两个版本的client.在装第一个client后,plsql可以顺利连接数据库a并登录. 2.安装 ...

  3. Expdp 导数错误 ORA-00832

    问题实验环境 操作系统:Red Hat Enterprise Linux Server release 5.7 (Tikanga) 数据库  :Oracle Database 10g Release ...

  4. GG同步sqlserver报错一个案例 Invalid date format

    在里面Oracle表同步sqlserver时间,在sqlserver当应用程序数据的结束.您可能会遇到这个错误. 2014-05-17 17:20:24 WARNING OGG-01154 SQL e ...

  5. Windows平台监听服务无法启动报报TNS-12560 TNS-00530案例

      在Windows Server 2012平台使用命令启动监听服务时遇到了TNS-12560 & TNS-00530错误. C:\Users>lsnrctl start GEW_LIS ...

  6. 线上Slave报1062的案例

    最近经常线上的Slave老报1062的错误,蛋碎一地,幸好Slave暂时没有用到业务上,也就是说没有做读写分离,所以Slave有问题,影响也不大,但每隔一阵子就报1062主键冲突的错误,让我好纠结,如 ...

  7. MySQL主从检验一致性工具pt-table-checksum报错的案例分析

    [问题] 有同事反馈我们改造过的MySQL5.7.23版本,使用pt-table-checksum工具比较主从数据库的一致性时报错 Unsafe statement written to the bi ...

  8. ORA-39901 EXPDP分区报错/分区表删除不完全

    [oracle@localhost zgy]$ expdp orders/orders directory=DUMPDIR DUMPFILE=test_exp.dmp TRANSPORT_TABLES ...

  9. 关于oracle 11g导出数据时 报 ORA 1455错误的处理

    因为导出的该用户的表可能存在空数据表,那么可能就会出现此其异常. 首先:  查看:     SQL>show parameter deferred_segment_creation;  假设为T ...

随机推荐

  1. php有必要用swoole吗

    在 Swoole 官网的自我介绍是“面向生产环境的 PHP 异步网络通信引擎”,首先 Swoole 它是一个网络应用的开发工具,它支持 Http.TCP.UDP.WebSocket. Swoole 和 ...

  2. C语言搬书学习第一记 —— 认识一个简单程序的细节

    #include<stdio.h> /*告诉编译器把stdio.h 中的内容包含在当前程序中,stdio.h是C编译器软件包的标准部分,它提供键盘输入和 屏幕输入的支持studio.h文件 ...

  3. Hyperledger Fabric私有数据

    官方文档:点这里 1简介 在同一个通道中,允许某一组织在对同一通道内其他组织保持部分的数据私有.也就是说有一部分被标识为私有的数据只能具有权限的组织查看和操作,而其余组织不具备查看和操作私有数据的权限 ...

  4. 洛谷P5364 [SNOI2017]礼物 题解

    传送门 /* 热情好客的小猴子请森林中的朋友们吃饭,他的朋友被编号为 1∼N,每个到来的朋友都会带给他一些礼物:大香蕉.其中,第一个朋友会带给他 11 个大香蕉,之后,每一个朋友到来以后,都会带给他之 ...

  5. IDEA的Maven设置阿里镜像

    作为一名.net开发学习java,虽然学习起来没啥难度,但是各种配置实在让人头大. 下面就简单记录下IDEA的Maven设置阿里镜像 进入开发软件的这个设置 点击进入 如图所示 第一个是你安装mave ...

  6. asp.net 页面中添加普通视频的几种方式

    第一种 是通过调用window media player进行播放诸如:wmv,asf等格式文件: <object align=center class="OBJECT" cl ...

  7. Netfilter,获取http明文用户名和密码

    目录 Netfilter简介 实验-target端 内核模块的操作 初始化netfilter 解析http包,获取用户名和密码 实验-hack端 遇到的问题 @ Netfilter简介 Netfilt ...

  8. win10 安装cuda和cudnn

    首先通过nvidia-smi 查看自己的显卡驱动对应的cuda版本. 参考:https://blog.csdn.net/qq_40212975/article/details/89963016 再去官 ...

  9. Hive参数调优

    调优 Hive提供三种可以改变环境变量的方法,分别是: (1)修改${HIVE_HOME}/conf/hive-site.xml配置文件: 所有的默认配置都在${HIVE_HOME}/conf/hiv ...

  10. nginx 反向代理之 proxy_pass

    格式很简单: proxy_pass URL; 其中URL包含:传输协议(http://, https://等).主机名(域名或者IP:PORT).uri. 示例如下: proxy_pass http: ...