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.


Oracle Database

Avatar of undefined
Last Comment
dbadm

8/22/2022 - Mon
slightwv (䄆 Netminder)

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

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

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
dbadm

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 
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
slightwv (䄆 Netminder)

>>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.
chalie001

ASKER
Where do I put this parfile
slightwv (䄆 Netminder)

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
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
dbadm

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"?