当前位置: 首页 > news >正文

解决oracle IMP工具导入dmp文件 IMP-00033: Warning: Table “...“ not found in export file 错误

想导入一个Java的dmp解析器中自带的dmp文件,报错如下:

imp c##test/test123 tables=\(IGNORE, IGNORE2, TABLE1, TABLE2\) file=/par/exptest.dmp Import: Release 19.0.0.0.0 - Production on Sat Apr 4 13:31:28 2026 Version 19.3.0.0.0 Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved. Connected to: Oracle Database 19c Standard Edition 2 Release 19.0.0.0.0 - Production Version 19.3.0.0.0 IMP-00002: failed to open /par/exptest.dmp for read Import file: expdat.dmp > /par/exptest.dmp Export file created by EXPORT:V12.01.00 via conventional path Warning: the objects were exported by SYSTEM, not by you import done in US7ASCII character set and AL16UTF16 NCHAR character set import server uses AL32UTF8 character set (possible charset conversion) IMP-00403: Warning: This import generated a separate SQL file "import_sys" which contains DDL that failed due to a privilege issue. . importing SYSTEM's objects into C##TEST IMP-00033: Warning: Table "IGNORE" not found in export file IMP-00033: Warning: Table "IGNORE2" not found in export file IMP-00033: Warning: Table "TABLE1" not found in export file IMP-00033: Warning: Table "TABLE2" not found in export file Import terminated successfully with warnings.

应该不是权限问题,因为我已经用sys用户grant dba to c##test;了。
看到Warning: the objects were exported by SYSTEM, not by you消息,以为数据表是SYSTEM的,用如下命令行:

imp c##test/test123 tables=\(IGNORE, IGNORE2, TABLE1, TABLE2\) file=/par/exptest.dmp fromuser=system touser=c##test

结果还是同样的错误。
想起有个indexfile参数可以显示imp时执行的语句,如下命令行成功了。

[oracle@113bf6abbd59 par]$ imp c##test/test123 file=/par/exptest.dmp FULL=Y ignore=y indexfile=/par/indexf2.sql Import: Release 19.0.0.0.0 - Production on Sat Apr 4 23:58:12 2026 Version 19.3.0.0.0 Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved. Connected to: Oracle Database 19c Standard Edition 2 Release 19.0.0.0.0 - Production Version 19.3.0.0.0 Export file created by EXPORT:V12.01.00 via conventional path Warning: the objects were exported by SYSTEM, not by you import done in US7ASCII character set and AL16UTF16 NCHAR character set import server uses AL32UTF8 character set (possible charset conversion) IMP-00403: Warning: This import generated a separate SQL file "import_sys" which contains DDL that failed due to a privilege issue. . . skipping table "IGNORE" . . skipping table "IGNORE2" . . skipping table "TABLE1" . . skipping table "TABLE2" Import terminated successfully with warnings.

从过程中可以看到,这4个表确实存在。
打开/par/indexf2.sql文件,明白了

REM CREATE TABLE "EXPTEST"."IGNORE" ("COLUMN1" VARCHAR2(20)) PCTFREE 10 REM PCTUSED 40 INITRANS 1 MAXTRANS 255 TABLESPACE "USERS" LOGGING REM NOCOMPRESS ; ...

原来表的schema是EXPTEST,而不是SYSTEM,用如下命令行,导入成功。

[oracle@113bf6abbd59 par]$ imp c##test/test123 fromuser=EXPTEST touser=c##test tables=\(IGNORE, IGNORE2, TABLE1, TABLE2\) file=/par/exptest.dmp Import: Release 19.0.0.0.0 - Production on Sun Apr 5 00:03:32 2026 Version 19.3.0.0.0 Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved. Connected to: Oracle Database 19c Standard Edition 2 Release 19.0.0.0.0 - Production Version 19.3.0.0.0 Export file created by EXPORT:V12.01.00 via conventional path Warning: the objects were exported by SYSTEM, not by you import done in US7ASCII character set and AL16UTF16 NCHAR character set import server uses AL32UTF8 character set (possible charset conversion) IMP-00403: Warning: This import generated a separate SQL file "import_sys" which contains DDL that failed due to a privilege issue. . importing EXPTEST's objects into C##TEST . . importing table "IGNORE" 0 rows imported . . importing table "IGNORE2" 0 rows imported . . importing table "TABLE1" 7 rows imported . . importing table "TABLE2" 4 rows imported Import terminated successfully with warnings.
http://www.jsqmd.com/news/590830/

相关文章:

  • 操作系统原理视角下的Graphormer模型推理性能调优
  • 【源码深度】Android View绘制流程全解析|吃透measure、layout、draw三大流程与UI卡顿优化|Android全栈体系150讲-10
  • 移动安全实验室:用Unidbg动态分析小红书核心加密协议(附Hook脚本)
  • FireRedASR Pro在软件测试中的应用:语音交互功能自动化测试
  • 突破音乐格式壁垒:QMCDecode实现QQ音乐加密文件跨平台播放的完整方案
  • 数据分析之数据粒度(Granularity)
  • 若依框架分页实践:避开PageHelper与PageInfo的常见陷阱
  • mootdx:金融数据接口零代码解决方案,让财务分析效率提升10倍
  • DDR内存工作原理详解:从Bank Group到突发传输的实战指南
  • Redis数据类型与命令速查手册:从字符串到有序集合的实战操作
  • 终极指南:如何用UABEA轻松处理Unity资源包
  • 抖音批量下载工具:5分钟搞定视频、音乐、直播内容保存
  • 数字游民必备!bge-large-zh-v1.5云端部署,轻薄本也能跑大模型
  • DeepSeek-OCR-2网络协议分析:从HTTP到gRPC性能对比
  • 3分钟掌握抖音无水印批量下载:开源工具终极解决方案
  • 像素史诗惊艳UI细节:金币黄按钮悬停反馈+硬阴影切换的CSS实现教程
  • 别再只会用RC了!从电源噪声到音频处理,聊聊LC、有源滤波器的实战选型心得
  • 暗黑3按键助手终极指南:5分钟配置,彻底告别手酸烦恼
  • 旧iOS设备复活指南:让你的iPhone/iPad重获新生
  • 终极文档下载指南:kill-doc浏览器脚本快速突破文档获取限制
  • 3步彻底解决显卡驱动残留:Display Driver Uninstaller深度应用指南
  • granite-4.0-h-350m快速上手:Ollama交互式会话与退出方法
  • iOS虚拟定位安全实现指南:iFakeLocation跨平台解决方案
  • 优必选高薪招聘具身智能首席科学家,凸显人形机器人行业人才困境
  • trackerslist使用指南:3步实现BT下载加速的终极方案
  • OpenClaw模型热切换技巧:Qwen3-14B与本地模型混合调用
  • YimMenu终极指南:3步轻松打造你的GTA5安全游戏堡垒
  • 开关电源设计与核心元器件选型指南
  • ccmusic-database效果对比:VGG19_BN+CQT vs ResNet在16流派分类中的表现
  • D3KeyHelper:暗黑破坏神3效率提升的终极解决方案