impdp 導入數據報ORA-39002,ORA-39070,ORA-39002, ORA-39087


出現問題

 
        
[oracle@dbServer ~]$ impdp userbook/userBook@orcl directory=dump_dir dumpfile=book.dmp schemas=userbook 報以下錯誤: ORA-39002: invalid operation ORA-39070: Unable to open the log file. ORA-39087: directory name DPDATA1 is invalid

查看問題信息 

[oracle@dbServer ~]$ oerr ORA 39087
39087, 00000, "directory name %s is invalid"
// *Cause: A corresponding directory object does not exist. // *Action: Correct the directory object parameter, or create a corresponding // directory object with the CREATE DIRECTORY command.
[oracle@dbServer ~]$ oerr ORA 39070
39070, 00000, "Unable to open the log file."
// *Cause: Errors were detecting while opening the log file. Subsequent // messages will detail the problems. // *Action: Fix the problems outlined in the secondary messages.

下面是問題分析解決的思路: 

1.首先,檢查directory是否已創建

select * from dba_directories;

結果是directory已經創建,這里沒有問題。

2.然后,檢查Linux服務器上是否已創建目錄:

[oracle@hellooracle ~]$ ll /data/dump/ total 97780
-rw-r----- 1 oracle dba 323584 Nov 1 07:50 DDQNSCHEMA.DMP -rw-r--r-- 1 oracle dba 331776 Jan 17 21:24 book.dmp -rw-r--r-- 1 oracle dba 1839 Nov 1 07:50 export.log -rw-r----- 1 oracle dba 98529280 Oct 18 21:05 full.dmp -rw-r--r-- 1 oracle dba 2248 Jan 17 21:29 import.log -rw-r----- 1 oracle dba 425984 Oct 18 20:45 tablespacewt.dmp -rw-r----- 1 oracle dba 348160 Oct 18 19:02 wtschema.dmp -rw-r----- 1 oracle dba 159744 Oct 18 19:12 wttab.dmp

顯然,目錄已經創建。

3.檢查是否未賦予directory的讀寫權限,

SELECT * FROM all_tab_privs WHERE table_name ='DUMP_DIR';

執行賦權限語句:

grant read,write on directory dump_dir to public;

 再次執行導入語句進行驗證:

[oracle@dbServer ~]$ impdp userbook/userBook@orcl directory=dump_dir dumpfile=book.dmp schemas=userbook

問題順利解決,數據成功導入。

參考:http://blog.itpub.net/31394774/viewspace-2216742/


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM