'Error path not found while Importing oracle dmp file in windows OS
I make an oracle dmp file by export it from linux os , which is the ORACLE_HOME path is start with /u01/app/oracle/.. (the default path) , and the DataBaseFiles (.dbf) directory is start with /u03/oracle/oradata/.
my problem is how can I import this dmp file to oracle database that installed in windows OS , I try to do it but I got an error that tell me the /u03/oracle/oradata/ not found .
hint : windows pathes is start with lettere (C:,D:,E:), and linux start with root slash (/).
What is the right impdp command to solve my problem?
impdp command that i used:
impdp user/password dumpfile=database1.dmp logfile=database1.log full=y
Solution 1:[1]
The database uses directory objects to reference the location of a Data Pump export file. You first need to create the directory object to reflect where you want the dump file to be and you also use it to grant privileges to the user in charge of executing the import or export.
Example on Linux:
connect / as sysdba
set echo on
create or replace directory work_data as '/home/oracle/data';
grant read, write on directory work_data to system;
Example on Windows:
connect / as sysdba
create or replace directory WORK_DATA as 'D:\User\Dev\DataPump\MyDP';
grant read, write on directory WORK_DATA to system;
You then reference the directory object in expdp or impdp commands. For instance:
Export from Linux
expdp system/manager DUMPFILE=WORK_DATA:DP_EXPORT_DATA%U.DMP LOGFILE=WORK_DATA:DP_EXPORT_DATA.log ...
Import from Windows:
impdp system/manager DUMPFILE=WORK_DATA:DP_EXPORT_SCOTT%U.DMP
DUMPFILE=WORK_DATA:SCOTT.DMP ...
Solution 2:[2]
You might create the tablespaces and users in the target database before you do the import. Data Pump import creates tablespaces and users by default, but you can add a parameter to prevent this:
#
# Prevent DP from trying to create existing user
EXCLUDE=USER:"='SCOTT'"
#
That way, if SCOTT was already created with an existing default tablespace (with datafiles located where you want them to be) in the target database, the import will just use the tablespace and data files.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Francois Pons |
| Solution 2 | Francois Pons |
