The directory that your dumpdir
database directory object points to needs to be a valid existing directory - at least by the time you use it, it won't check or complain when you create the object - and it needs to be readable and writable by the user that Oracle is running under, which is usually oracle
.
Your initial directory creation had 'usr/lib/oracle/...
rather than '/usr/lib/oracle/...
, but even with that corrected the directory might not be usable by the oracle
account. Since you created the directory as root
, it is probably still owned by root:root
and with permissions 700 (if you do ls -ld /usr/lib/oracle/xe/app/oracle/admin/XE/dpdump
that will show as drwx------
).
You need to change that to be owned by Oracle, using the correct owner and group - that's probably oracle:dba
or oracle:oinstall
, but check the owner of the XE
directory. And then change the ownership of the directory and the files you copied into it:
chown -R oracle:dba /usr/lib/oracle/xe/app/oracle/admin/XE/dpdump
and set the directory permissions to a suitable level; if you don't want anyone else to create or modify files, but you don't mind them seeing what's there, then something like:
chmod 755 /usr/lib/oracle/xe/app/oracle/admin/XE/dpdump
If you want to be able to copy your .dmp
file in as yourself (not root
or oracle
) and you aren't in the dba
group then make it 777. You said the files you copied are 777, which is a little odd as they aren't executable, and could currently be removed by anyone; again to make them just readable:
chmod 644 /usr/lib/oracle/xe/app/oracle/admin/XE/dpdump/*
You don't need the export log from the other system though, just the dump file itself. The logfile
parameter for impdp
will create a log of the import process; since you used the same file name it will overwrite the export log you copied across. THat probably doesn't matter since you still have the original, but something to watch for in the future. It does mean the existing log file has to be writable by oracle
though.
You also need to make sure the Oracle owner has appropriate access to the whole directory tree, but it seems likely that they already own XE
so I don't think that's an issue here. You shouldn't really need to do any of this as root
. If you don't have the oracle
password you can su
to the account from root
anyway, which remove the need to manually change ownership later.