ORA-29283: invalid file operation ORA-06512: at “SYS.UTL_FILE“, line 536 ORA-39000: bad dump file s

129 篇文章 7 订阅

在数据泵导入时发生报错ORA-29283: invalid file operation

[oracle@localhost dir]$  impdp user/userdirectory=dir dumpfile=user2020.dmp logfile=imp.log

Import: Release 11.2.0.4.0 - Production on Tue Oct 20 17:08:29 2020

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, OLAP, Data Mining and Real Application Testing options
ORA-39002: invalid operation
ORA-39070: Unable to open the log file.
ORA-29283: invalid file operation
ORA-06512: at "SYS.UTL_FILE", line 536
ORA-29283: invalid file operation

查找问题发现是指定文件夹有问题,解决办法

  • 查看文件夹
SQL> select * from dba_directories;

OWNER        DIRECTORY_NAME            DIRECTORY_PATH
------------------------------------------------------------
SYS        DIR                         /oracle/dir
SYS        XMLDIR                      /u01/app/oracle/product/11.2.0/dbhome_1/rdbms/xml
SYS        ORACLE_OCM_CONFIG_DIR       /u01/app/oracle/product/11.2.0/dbhome_1/ccr/hosts/localhost.localdomain/state
SYS        DATA_PUMP_DIR               /u01/app/oracle/admin/ora11g/dpdump/
SYS        ORACLE_OCM_CONFIG_DIR2      /u01/app/oracle/product/11.2.0/dbhome_1/ccr/state
  • 重建文件并授权问题解决
SQL> create or replace directory  dir as  '/oracle/midsora' ;

Directory created.

SQL> grant read ,write on directory  dir  to tsunami;

Grant succeeded.

SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@localhost dir]$  impdp user/user directory=dir dumpfile=user2020.dmp logfile=imp.log

Import: Release 11.2.0.4.0 - Production on Tue Oct 20 17:10:09 2020

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, OLAP, Data Mining and Real Application Testing options
ORA-39001: invalid argument value
ORA-39000: bad dump file specification
ORA-39142: incompatible version number 4.1 in dump file "/oracle/midsora/tsunami2020.dmp"

报错ORA-39000: bad dump file specification

问题分析:数据泵从高版本库向低版本库导入数据时必须指定版本号,否则会出现上面的错误。
原因是导出的实例是12c,导入的实例是11g。

重新导出:

expdp system/oracle directory=dir dumpfile=user2020.dmp logfile=user2020.log version=11.2.0.4.0

再导入就没问题:

impdp user/userdirectory=dir dumpfile=user2020.dmp logfile=imp.log
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值