Oracle导入dmp文件:ora异常[关闭]
-
29-09-2020 - |
题
我正在尝试导入一个 .dmp
使用以下命令将文件保存到我的 Oracle RAC 数据库:
C:\app\ptmp>impdp [user]/[password]@'DEVRAC-SCAN:1521/DB' DUMPFILE=UPG_E_7d291ff.dmp
LOGFILE=UPG_E_7d291ff.log TABLE_EXISTS_ACTION=REPLACE
我从 oracle 得到以下输出:
Import: Release 12.1.0.2.0 - Production on Thu Dec 17 09:43:13 2015
Copyright (c) 1982, 2015, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit
Production
With the Partitioning, Real Application Clusters, Automatic Storage Management,
OLAP,
Advanced Analytics 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
我环顾四周,有些人(https://community.oracle.com/thread/3788748?start=0&tstart=0 && https://stackoverflow.com/questions/11878631/expdp-from-oracle-rac-environment)说这可能是一个权限问题,所以我检查了权限:
C:\app\ptmp>icacls c:\app\oracle\admin\pldb\dpdump
c:\app\oracle\admin\pldb\dpdump Everyone:(R,W)
BUILTIN\Administrators:(OI)(CI)(F)
NT AUTHORITY\SYSTEM:(OI)(CI)(F)
PL\PLORACLE:(OI)(CI)(F)
DEVRAC1\Administrator:(OI)(CI)(F)
DEVRAC1\ORA_GRID_LISTENERS:(OI)(CI)(F)
BUILTIN\Administrators:(I)(OI)(CI)(F)
NT AUTHORITY\SYSTEM:(I)(OI)(CI)(F)
PL\PLORACLE:(I)(OI)(CI)(F)
DEVRAC1\Administrator:(I)(OI)(CI)(F)
DEVRAC1\ORA_GRID_LISTENERS:(I)(OI)(CI)(F)
神谕 tnslistener
运行在 PL\PLORACLE
用户。<-- 这实际上不是真的,请参阅编辑。
我使用这些命令来创建/更改数据泵目录:
echo create or replace directory DATA_PUMP_DIR as 'C:\app\oralce\admin\pldb\dpdump\'; >1_UPDATE_DUMP_LOC.SQL
echo grant read,write on directory DATA_PUMP_DIR to public; >>1_UPDATE_DUMP_LOC.SQL
它们是在批处理文件中使用以下命令运行的:
sqlplus -S [user]/[password]@'DEVRAC-SCAN:1521/PLDB' <1_UPDATE_DUMP_LOC.SQL >1_UPDATE_DUMP_LOC.LST
运行命令的用户有 sysdba
数据库的权限。因此,尽管如此,我真的无法理解为什么要导入 .dmp
文件不工作。
编辑:
神谕 tnslistener
实际上运行为 local service
而不是 PL\PLORACLE
和我想的一样。这 OracleJobSchedulePLDB_1
, OracleServicePLDB_1
和 OracleVssWriterPLDB_1
运行在 PL\PLORACLE
尽管。其余的 oracle 服务运行为 Local System/Service
解决方案 2
我一直在尝试的道路 c:\app\oracle\admin\pldb\dpdump
似乎被 Oracle 锁定了,所以我只是选择了 c:\app\ptmp
一切似乎对我来说都很好......不知道为什么。
其他提示
看起来是对目录的写入失败,但是是在操作系统级别。
运行 impdp 的操作系统用户是否具有写入该目录的操作系统权限?