使用数据泵(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 toNote 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 25139545as 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.1to 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 UtilitiesStill 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)

oracle导数时不包含某个表,EXPDP导数报ORA-00942案例相关推荐

  1. 删除Oracle数据库时常见问题(注册表方面,文件目录方面,环境变量方面)

    运行regedit命令,打开注册表.删除注册表中与Oracle相关内容,具体下: 删除HKEY_LOCAL_MACHINE/SOFTWARE/ORACLE目录. 删除HKEY_LOCAL_MACHIN ...

  2. IDEA添加oracle数据库时不显示数据表

    idea添加oracle数据库后,找不到需要的表, 但是直接查询是可以查询到数据的 原因: 数据库默认schema不显示完整, 只显示了public和登录账号对应表,其他账号的表未显示 解决方法: 在 ...

  3. oracle 数据泵impdp导入dmp文件时更改用户及表空间方法

    oracle impdp导入dmp文件时更改用户及表空间方法 impdp默认导入expdp的dmp文件时,是需要建立相同名称的表空间及临时表空间的:而且会自动创建相同名称的用户名. 但是有时候我们想更 ...

  4. 数据导不进oracle数据库,学习笔记:Oracle逻辑导出/导入 数据逻辑导出时跳过指定表不进行导出...

    天萃荷净 Oracle数据库逻辑exp导出时,跳过指定某些表,对其表中数据不进行导出 有一个需求,某个用户有很多张表,但是只能使用exp导出,而且想跳过其中某几张表,其他对象包括依赖关系都需要.针对这 ...

  5. Activiti+oracle 启动项目时不能自动建表或更新表的问题分析及解决办法

    现象描述:按照正常配置,第一次启动时不能自动建表 关键配置片段如下: <bean id="processEngineConfiguration" class="or ...

  6. oracle9i用expdp导出全库,Linux下Oracle 11g数据库全库自动备份(EXPDP)

    使用EXPDP方式备份整个实例 本教程可使用system账户将整个实例备份(包含空表),并自动删除超过6天的历史数据. 1.r oot用户登录服务器 mkdir -p /backup/oracleda ...

  7. Oracle数据库迁移:异构传输表空间TTS HP-UX迁移至Redhat Linux 7.7

    墨墨导读:本文来自墨天轮用户"你好我是李白"的投稿,记录一个Oracle数据库迁移过程 :异构传输表空间TTS HP-UX迁移至Redhat Linux 7.7.墨天轮主页:htt ...

  8. 直接点oracle表编辑器,DbForge Studio for Oracle入门教程:如何在表编辑器中创建表...

    dbForge Studio for Oracle是一个功能强大的集成开发环境(IDE),它提供了通用的数据编辑工具来管理数据库内和外部数据,能够帮助Oracle开发者提高PL/SQL的编码速度. [ ...

  9. oracle并行parallel update两张表_Oracle与并行性 parallel

    Oracle与并行性 并行化操作能力是巨型数据库(Very Large Database,简称VLDB)最重要的特性之一.带有多个CPU的数据库服务器,也被称作SMP,目前是大多数数据库服务器的标准配 ...

  10. oracle下的数据库实例、表空间、用户及其表的区分

    完整的Oracle数据库通常由两部分组成:Oracle数据库和数据库实例.  1) 数据库是一系列物理文件的集合(数据文件,控制文件,联机日志,参数文件等):  2) Oracle数据库实例则是一组O ...

最新文章

  1. cnblogs和org2blog使用总结
  2. 嵌入式学习:存储器总结
  3. 通用软件测试的6个角度
  4. 扎克伯格曝光Meta的小目标:AI自动生成元宇宙,实时翻译所有语言
  5. MFC显示位图 from http://blog.csdn.net/liuzhuomju/article/details/7299458
  6. 打印二叉搜索树的叶子结点_求孩子兄弟树叶子节点数目
  7. Web缓存的作用与类型
  8. ASP.NET MVC5+EF6+EasyUI 后台管理系统(27)-权限管理系统-分配用户给角色
  9. OE 发邮件 500 Error: bad syntax', Port: 25, ... Error Number: 0x800CCC79
  10. CMMI认证适用的行业范围
  11. 【AD封装】TF(micro SD)卡座封装大全(带3D)
  12. python合并两个txt、并且逐条合并_用python实现两个文本合并
  13. mysql batch insert_使用batch insert解决MySQL的insert吞吐量问题
  14. 肠道菌群失调与炎症性肠病的关联
  15. 分享一款电脑使用的二维码/条码扫描生成软件--二维码识别精灵
  16. kerberos搭建
  17. 动网论坛7.0获得WebShell的分析
  18. 力扣(leetcode)[118. 杨辉三角] 简单
  19. 基于单片机的居家安全报警系统
  20. [20170412]bbed隐藏数据记录.txt

热门文章

  1. 2021年安全员-C证考试题库及安全员-C证考试资料
  2. 计算机文件夹知识心得体会,计算机基础学习心得体会范文(通用3篇)
  3. 微信视频文件保存在服务器吗,如何发送大的视频文件给朋友和家人
  4. 【百科】喜马诺变速器
  5. 求助!mac版cc2017安装错误
  6. dbt2 mysql_DBT2 Benchmark Tool (mysql压力测试工具) V0.37.50.14
  7. mac 4k分辨率 字太小 27寸 hidpi_2019年两千价位你可以买到一台怎样的4K显示器?AOC U2790PQU...
  8. 计算机R3处理器,2018年3月最新版处理器天梯图 秒懂三月台式电脑处理器性能排行...
  9. Android软件自动更新升级(自动下载安装新版本)
  10. C#编写的winform程序绑定comboBox成功,添加一个默认的文字选项请选择