0

I’ve got a full Dump of an Database (all schema, system etc...) Now I want to import just one schema of this file, is this even possible?

As far I got this command:

impdp sysadm/sysadm@sysadm schemas=sysadm directory=dp_dir dumpfile=export.dmp logfile=export.log 

Would this work? The problem is, in this dump file there are schemas that are already used and I can't overwrite them (I can but it would be pain for me to recover them)

thanks for help

domiSchenk
  • 880
  • 4
  • 23
  • 41

2 Answers2

1

It should work as you have shown. You might also want to take a look at the TABLE_EXISTS_ACTION parameter to provide additional warm-fuzziness. With that you can skip tables that exist already.

That said, of course you will have a backup of your database before you start? Or if it's a real pain to recover, perhaps you could create another test database to try this out on?

DCookie
  • 42,630
  • 11
  • 83
  • 92
  • till now we had used exp and imp, but now I got a DP dump, and we did delete the user and create a new one. So i did the same now. To create a new DB my It admin would kill me :/ we had ordered one but didn’t get it. Well I will try it and see :-D – domiSchenk Sep 26 '11 at 16:03
  • IMO, the data pump analogs for import/export are a big improvement. They are faster and provide more features. The only downside is that they are server based, so your output files get created on the server where the database resides, which may require the file being moved to a different server prior to import. – DCookie Sep 26 '11 at 16:30
  • well i import it on a other server. Its a dump form a 3th. party company so this should be no problem. atm its working so lets see whats happening :-D – domiSchenk Sep 26 '11 at 17:04
  • You have to use data pumps in 11g2 now or it won't export empty tables. – tsells Sep 29 '11 at 04:42
  • @tsells, hmmm, can you use the QUERY parameter to select no rows? – DCookie Sep 29 '11 at 14:10
  • Not that I am aware of. It's a known issue. I think they did it on purpose to help speed up the process of deprecating the old functions. IMO. – tsells Sep 29 '11 at 17:57
0
    "impdp system/*****@nsd1 directory=DATA_PUMP_DIR parfile=exclude_schemas_parfile.par REMAP_SCHEMA=old_schema:new_schema remap_tablespace=Schema1_TS_TABLES:Schema2_TS_TABLES  dumpfile=schema1.dmp LOGFILE=schema1_import.log"

.par file enteries look like this:

exclude=SCHEMA:"='CTXSYS'"
exclude=SCHEMA:"='ORDDATA'"
exclude=SCHEMA:"='OWBSYS_AUDIT'"
.
.
get list of all schemas from schema1 (using system user).


Thanks
Mr.T
  • 33
  • 6