Link to home
Start Free TrialLog in
Avatar of chalie001
chalie001

asked on

issue importing diffirent schema

hi am in 19c trying to import in diffirent schema
 impdp system/pswd@dbname schemas=schemaname directory=TEST_DIR dumpfile=dumpfile.dmp logfile=expdp.log remap_schema=schemaname:cata

Import: Release 19.0.0.0.0 - Production on Tue Jun 1 09:27:04 2021
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
ORA-39002: invalid operation
ORA-39165: Schema schemaname was not found.


Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Error seems self explanatory:  schemaname isn't in the export file.
Avatar of chalie001

ASKER

i dont know the schema name in dmp file i what to import in my schema which is empty
ASKER CERTIFIED SOLUTION
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
create parfile impsqlfile.par

USERID=system/pswd@dbname
DIRECTORY=TEST_DIR
LOGFILE=expdp.log
DUMPFILE=dumpfile.dmp
SQLFILE=dumpsql.sql

then run: impdp parfile=impsqlfile.par 
>>create parfile impsqlfile.par

That is optional.  Since you already have 99% of what you want on the command line itself, it's not necessary.

They just save you typing over and over when repeating imports and exports.
Where do I put this parfile
The parfile itself won't help solve your problem.  It is just a parameter file that stores the same values you used on the command line.

The parfile can be in any directory.  

Are you looking at the doc links I post?  The PARFILE is just a few parameters above SQLFILE I posted above:
https://docs.oracle.com/en/database/oracle/oracle-database/19/sutil/datapump-import-utility.html#GUID-F703B422-4584-493B-A5B3-651B40CDB765
The optional parfile is used to simplify the management of parameters entered at the command line, run "impdp parfile=impsqlfile.par" from the same path where you created the parfile.

The import error is telling you that Data Pump did not find anything owned by that schema "schemaname" in the dump file "dumpfile.dmp"

Have you the log file of your expdp "dumpfile.dmp"?