oracle expdp 39002,expdp 导入数据时ORA-39002、ORA-39070错误排查
今天用expdp的時(shí)候,報(bào)錯(cuò)
[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
看到這個(gè)錯(cuò)誤后,先想到的權(quán)限的問題,以為是數(shù)據(jù)庫內(nèi)的directory的權(quán)限沒有賦給相關(guān)的用戶,但是經(jīng)過查詢后發(fā)現(xiàn)已經(jīng)給相關(guān)的用戶賦予了read,write權(quán)限了。
目錄下是否生成了導(dǎo)入log文件,如果沒有,就肯定是目錄讀寫權(quán)限問題。
折騰了很久后發(fā)現(xiàn)原來是由于在數(shù)據(jù)庫內(nèi)創(chuàng)建directory時(shí)有個(gè)字母寫錯(cuò)了,而服務(wù)器上根本就沒有這個(gè)目錄,因此就報(bào)這個(gè)錯(cuò)誤了。
解決辦法就是要么刪除directory重建,使其對(duì)應(yīng)的目錄和服務(wù)器一致,要么就是在服務(wù)器上創(chuàng)建和之前directory指定的目錄一致。我通過重建directory后,順利將數(shù)據(jù)導(dǎo)入。
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
但是并沒有這個(gè)目錄
[oracle@jcy2 ~]$ cd /home/oracle/rman/expdp
-bash: cd: /home/oracle/rman/expdp: No such file or directory
錯(cuò)誤目錄是:/home/oracle/rman
/expep
解決方法:mv
expep /home/oracle/rman
/expdp
與50位技術(shù)專家面對(duì)面20年技術(shù)見證,附贈(zèng)技術(shù)全景圖總結(jié)
以上是生活随笔為你收集整理的oracle expdp 39002,expdp 导入数据时ORA-39002、ORA-39070错误排查的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 日本外设厂 HORI 推出《勇者斗恶龙》
- 下一篇: 人力资源oracle,Oracle Co