Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Oracle 11g. Unable to import dump files, even though schema is created

I have created a user in Oracle 11gR2, using the following script

create user          cata
identified by        cata
default   tablespace tbs
temporary tablespace temp;

grant DBA to cata;

After trying to import a dump file using the command

impdp system/password@ORCL11 schemas=cata dumpfile=cata.dmp logfile=log.txt

i'm getting the following error

ORA-39002: invalid operation ORA-39165: Schema ATGDB_CATA was not found.

Surprisingly, when i try to export a dump from the same schema, i'm able to do that. So, if the schema was not created properly then i should not be able to export the dump file as well, right ?

I have also checked in dba_users & the schema is created. Is there anything else that i can do which could resolve this problem

like image 488
Aazim Avatar asked Dec 21 '22 19:12

Aazim


1 Answers

Out of the error message I guess that the original schema name was "atgdb_cata".

As you are now trying to import into a schema named "cata" you need to specify the parameter remap_schema

So for your case: impdp system/password@ORCL11 schemas=atgdb_cata dumpfile=cata.dmp logfile=log.txt remap_schema=atgdb_cata:cata

like image 70
GWu Avatar answered May 25 '23 18:05

GWu