expdp 导入数据时ORA-39002、ORA-39070错误排查

来源:这里教程网 时间:2026-03-03 15:05:17 作者:

今天用expdp的时候,报错[oracle@jcy2 exped]$ expdp \'/as sysdba\' directory=c1 dumpfile=full.dmp full=y logfile=full.log; Export: Release 11.2.0.4.0 - Production on Sat Feb 22 21:15:01 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 看到这个错误后,先想到的权限的问题,以为是数据库内的directory的权限没有赋给相关的用户,但是经过查询后发现已经给相关的用户赋予了read,write权限了。 目录下是否生成了导入log文件,如果没有,就肯定是目录读写权限问题 折腾了很久后发现原来是由于在数据库内创建directory时有个字母写错了,而服务器上根本就没有这个目录,因此就报这个错误了。 解决办法就是要么删除directory重建,使其对应的目录和服务器一致,要么就是在服务器上创建和之前directory指定的目录一致。我通过重建directory后,顺利将数据导入。 SQL> col owner for a6 SQL> ^C   SQL> ^M SQL> col DIRECTORY_NAME for a20 SQL> col DIRECTORY_PATH for a30 SQL> select * from dba_directories where DIRECTORY_NAME='c1'; no rows selected SQL> select * from dba_directories where DIRECTORY_NAME='C1'; OWNER  DIRECTORY_NAME        DIRECTORY_PATH ------ -------------------- ------------------------------ SYS    C1            /home/oracle/rman/expdp 但是并没有这个目录[oracle@jcy2 ~]$ cd /home/oracle/rman/expdp -bash: cd: /home/oracle/rman/expdp: No such file or directory错误目录是:/home/oracle/rman /expep 解决方法:mv expep /home/oracle/rman /expdp https://blog.csdn.net/snowfoxmonitor/article/details/48193061

相关推荐