1

I have the following command to import a dump file to another Database (DB_B) with different schema. Oracle's Data Pump import

impdp SYSTEM/PASSWORD DUMPFILE=dpump_dir1:expfull.dmp FULL=y LOGFILE=dpump_dir2:full_imp.log

expfull.dmp from DB_A contains alot of different roles, users, tablespaces and others while the DB_B is just a basic DB where I wanted to import my expfull.dmp it only contains default users, roles etc during DB creation. The usual steps I do to get an exact match of DB_A is to create each of these users and tablesspaces everytime I import a DB. Is there a command/flag where it will just automatically import all the contents of expfull.dmp to to DB_B without going through all the usual steps i just describe? I checked in google and oracle site there is remap_schema will somehow do this. But am not sure how it works or it does what i want. Any advice/help is greatly appreciated thanks in advance.

dimas
  • 2,487
  • 6
  • 40
  • 66
  • can you try imp username/password@hoststring file=filename.dmp log=filename.log full=y , username and password is your new user which is in your db that you want to transfer your data – CompEng Apr 04 '14 at 07:46
  • hi ersin, i dont think imp will work on my dump as I exported it using expdp. – dimas Apr 04 '14 at 07:48
  • can you try to export with exp command – CompEng Apr 04 '14 at 07:55
  • i can do that but the requirement for us is to do it using Data Pump so exp is not an option. – dimas Apr 04 '14 at 09:52

1 Answers1

0

I don't think there is a way to do it automatically like in imp/exp using the full=y which imports everything across, so you have to remap the tablespaces from one to the other by specifying where you want them to go. They don't have to be like for like ie:

impdp scott/tiger DIRECTORY=DBEXPDIR DUMPFILE=DBEXPDIR:export.dpdmp LOGFILE=DBEXPLOG:daily_import.dplog CONTENT=ALL TABLE_EXISTS_ACTION=TRUNCATE REMAP_SCHEMA=PRODDB:PROD_COPY REMAP_TABLESPACE=INDEX:INDEX_DEV REMAP_TABLESPACE=DATA:DATA_DEV REMAP_TABLESPACE=DATA2:DATA_DEV  REMAP_TABLESPACE=DATA3:DATA_DEV
mr-man
  • 37
  • 7