"But Mercurial!" you say, "surely you screwed something up setting up the directory and either it doesn't exist or you don't have access to it!" I would be the first to agree that is the most likely cause of the problem, but performing the following queries to double-check leaves me in a state of complete confusion:
C:\test>impdp cgernon/**** DIRECTORY=dp_dir SERVICE_NAME=test1 DUMPFILE=export.dmp LOGFILE=import.log Import: Release 22.214.171.124.0 - Production on Friday, 27 May, 2011 12:01:08 Copyright (c) 2003, 2007, Oracle. All rights reserved. Connected to: Oracle Database 11g Release 126.96.36.199.0 - Production ORA-39002: invalid operation ORA-39070: Unable to open the log file. ORA-39087: directory name DP_DIR is invalid
select * from all_directories; OWNER DIRECTORY_NAME DIRECTORY_PATH ----- -------------- ------------------- SYS DP_DIR C:\OracleImportTest
Does anyone know of any other conditions that can trigger this error, or see anything I'm missing here? I am thoroughly mystified. Thanks!
select * from user_tab_privs where table_name = 'DP_DIR'; GRANTEE OWNER TABLE_NAME GRANTOR PRIVILEGE GRANTABLE HIERARCHY ------- ----- ---------- ------- --------- --------- --------- CGERNON SYS DP_DIR SYS READ NO NO CGERNON SYS DP_DIR SYS WRITE NO NO
Export/Import DataPump Parameter DIRECTORY - How to Specify a Directory (Doc ID 266875.1)
C:\test>impdp cgernon/<pass> DIRECTORY=DP_DIR SERVICE_NAME=test1 DUMPFILE=export.dmp LOGFILE=import.log
Which brings up another question. In the past, I've used the SERVICE_NAME option to specify the TNS Name for the database instance I want to connect to. Is that not what this option actually represents? And if not, why was it working for me in the past?
impdp cgernon/****@test1 DIRECTORY=dp_dir DUMPFILE=export.dmp LOGFILE=import.log