Oracle - Importing data from another database (impdb)

The following script transferes the schema AAA from a database using the database link BBB. Because we want to store the log of this operation in file CCC we have to inform oracle to save it int the directory object DDD:

impdp system/system_user_password schemas=AAA directory=DDD network_link=BBB logfile=CCC  remap_schema=AAA:AAA remap_tablespace=AAA:AAA

1- The above script takes into consideration that the tablespace has the same name as the schema

2- In order to import the data, instead of only the databale elements (tables, views, etc) droping the schema might also be necesary.
To do it close all the connectiosn to that schema (TOAD, SqlDeveloper, etc), enter sqlpplus and drop the user:

drop user XXX cascade;


Popular posts from this blog

Oracle - duplicate fields in RECORD,TABLE or argument list are not permitted

Oracle - ORA-29282: invalid file ID, ORA-06512: at "SYS.UTL_FILE"