How to Import Dump with 2 Schemas for Different Dataspaces

Backup, Recover, Import, Export, Datapump, etc
Post Reply
davidcorbetta
Rank: Estagiário Pleno
Rank: Estagiário Pleno
Posts: 4
Joined: Wed, 08 May 2013 4:02 pm

I have a dump with which EXPDP was made with 2 schemas. I would like to do the IMPDP remapping the tablespace for 2 new tablespaces.

My current parfile:

Select all

 
userid=dba/dba@streetfight 
dumpfile=expdp-ryueken-15072016.dmp 
logfile=impdp-ryueken-15072016_imp.log 
#sqlfile=impdp-ryueken-15072016_imp.sql 
REMAP_SCHEMA=SCHEMA_RYU:RYU 
REMAP_SCHEMA=SCHEMA_KEN:KEN 
REMAP_TABLESPACE=TEMP:STREET 
TRANSFORM=OID:n:type 
But I wanted something like this:

Select all

 
userid=dba/dba@streetfight 
dumpfile=expdp-ryueken-15072016.dmp 
logfile=impdp-ryueken-15072016_imp.log 
#sqlfile=impdp-ryueken-15072016_imp.sql 
REMAP_SCHEMA=SCHEMA_RYU:RYU 
REMAP_SCHEMA=SCHEMA_KEN:KEN 
 
REMAP_TABLESPACE=TEMP:RYU_TABLESPACE 
REMAP_TABLESPACE=TEMP:KEN_TABLESPACE 
 
TRANSFORM=OID:n:type 

Thanks
User avatar
adrianoturbo
Moderador
Moderador
Posts: 393
Joined: Thu, 20 Mar 2008 4:09 pm
Location: Brasília
Adriano Alves
---Para cada problema dificil existe uma solução simples.----

Brother, do the following extract the DDLs from the two tablespaces from the source base and create the same on the new base and do the import.
I'm supposing you have two tablespaces on the source base.
I am treating Schema as objects within the bank such as: tables, views, indices, functions, packages, procedures among other objects.
Let's make it clear that schemas or objects are within the logical structure named: tablespace.
davidcorbetta
Rank: Estagiário Pleno
Rank: Estagiário Pleno
Posts: 4
Joined: Wed, 08 May 2013 4:02 pm

The origin only has 1 tablespace. What could be done is to do the IMP for a tablespace and then

Select all

ALTER USER ryu default tablespace TABLESPACE_RYU;
but wanted to put the imp in an index tablespace then change for data:

Select all

TRANSFORM=SEGMENT_ATTRIBUTES:n:index 
TRANSFORM=SEGMENT_ATTRIBUTES:n:constraint
davidcorbetta
Rank: Estagiário Pleno
Rank: Estagiário Pleno
Posts: 4
Joined: Wed, 08 May 2013 4:02 pm

As I wanted it is not possible, but to solve the problem, I must do this in separate parfiles, defining which schema I want to import, that is:

impdp-ryu.par ]

Select all

userid=dba/dba@streetfight 
dumpfile=expdp-ryueken-15072016.dmp 
logfile=impdp-ryueken-15072016_imp.log 
 
REMAP_SCHEMA=SCHEMA_RYU:RYU 
REMAP_TABLESPACE=TEMP:RYU_TABLESPACE 
 
SCHEMA=SCHEMA_RYU 
 
TRANSFORM=OID:n:type
IMPDP-KEN.PAR

Select all

userid=dba/dba@streetfight 
dumpfile=expdp-ryueken-15072016.dmp 
logfile=impdp-ryueken-15072016_imp.log 
 
REMAP_SCHEMA=SCHEMA_KEN:KEN 
REMAP_TABLESPACE=TEMP:KEN_TABLESPACE 
 
SCHEMA=SCHEMA_KEN 
 
TRANSFORM=OID:n:type
Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 12 guests