我想导入Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
使用命令:
impdp SOLVIA/SOLVIA900@IMMBO DUMPFILE=week_exp_immbo.dmp LOGFILE=week_exp_immbo.log REUSE_DATAFILES=YES exclude=tablespace:"IN ('IMMBO')"
但我收到了这个错误:
Connected to: Oracle Database 12c Standard Edition Release 12.2.0.1.0 - 64bit Production
ORA-39002: invalid operation
ORA-39070: Unable to open the log file.
ORA-39145: directory object parameter must be specified and non-null
我是否必须先创建日志文件?
答案 0 :(得分:1)
您需要为Directory参数提供值。
impdp SOLVIA/SOLVIA900@IMMBO
DIRECTORY=TEST_Dir <-- You need to provide value for this param
DUMPFILE=week_exp_immbo.dmp
LOGFILE=week_exp_immbo.log
REUSE_DATAFILES=YES
exclude=tablespace:"IN ('IMMBO')"
其中TEST_Dir
是Oracle中的Directory对象,指向文件所在的位置,从中导入数据。
CREATE DIRECTORY Test_Dir AS 'C:\TestFolder';
还要确保为该目录上的用户授予“读取”,“写入”权限。
GRANT READ, WRITE ON DIRECTORY Test_Dir TO UserName;