建立软链接
[oracle@qht120 /] ln -s /u02/dumpdata /u01/dumpdumpdata
oracle下建立directory
create directory dumppath as '/u01/dump/dumpdata';
此时导入文件 就会出错:
[oracle@qht120 genernal_ddl]$ impdp l5m/l5m directory=DUMPPATH dumpfile=dump_AMOTTVW_%U.dmp logfile=impdp_AMOTTVW.log schemas=AMOTTVW
Import: Release 18.0.0.0.0 - Production on Fri Apr 8 09:07:33 2022
Version 18.13.0.0.0
Copyright (c) 1982, 2018, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
ORA-39002: invalid operation
ORA-39070: Unable to open the log file.
ORA-29283: invalid file operation
ORA-29283: invalid file operation
权限确认用是没有问题的,经过排查应该是软链接的问题,因为之前在安装oracle时,$ORACLE_HOME和$ORACLE_BASE也不能指向软链接。
解决方法:
删除软链接,直接将directory指向目的目录:
drop directory dumppath;
create directory dumppath as '/u02/dumpdata';
再将导入就正常了!