Data Import IMPDP Failed
So basically i was trying to import a dump file for schema rcemca into schema rcecms. (on a side note: you create schema by creating user. So each user has its own schema). I created the IMPDP_DIR by the following:
create directory IMPDP_DIR as '/home/firman/Downloads'
grant read, write on IMPDP_DIR to rcecms
commit
I then queried the database to makes sure the newly created directory is there
select * from all_directories
It was there.
But i got the following error:
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
After some searches i figured out it was because the user oracle, which ultimately runs the necessary steps to import the data, which is different from the user with which i ran the impdp command, has no access to the /home/firman/Downloads directory. A permission problem. This was fixed by changing the permission of /home/firman/Downloads or better still, moving the dump file to the Oracle provided data pump directory, which is DATA_PUMP_DIR (query above).
create directory IMPDP_DIR as '/home/firman/Downloads'
grant read, write on IMPDP_DIR to rcecms
commit
I then queried the database to makes sure the newly created directory is there
select * from all_directories
It was there.
OWNER DIRECTORY_NAME
------------------------------ ------------------------------
DIRECTORY_PATH
--------------------------------------------------------------------------------
SYS EXPDP_DIR
/home/firman/Downloads
SYS XMLDIR
/u01/app/oracle/product/11.2.0/xe/rdbms/xml
SYS DATA_PUMP_DIR
/u01/app/oracle/admin/XE/dpdump/
And then I did:
impdp system/password DIRECTORY=IMPDP_DIR DUMPFILE=file.dmp schemas=rcemca remap_schema=rcemca:rcecmsBut i got the following error:
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
After some searches i figured out it was because the user oracle, which ultimately runs the necessary steps to import the data, which is different from the user with which i ran the impdp command, has no access to the /home/firman/Downloads directory. A permission problem. This was fixed by changing the permission of /home/firman/Downloads or better still, moving the dump file to the Oracle provided data pump directory, which is DATA_PUMP_DIR (query above).
0 komentar:
Posting Komentar