To guide a remote server's database to another server today, colleagues have already added a regular export function to the source server, using the EXPDP exported DMP file, with the export log. log file. Therefore, to import to the target server, you must import it in IMPDP mode.
First of all, the target server must have already built database and database instances, I am here are ORCL, bfb2c/dhhzdhhz.
Secondly, send a command to import DMP file in cmd
Get the. log file from the source server and open the top section of the code as follows:
system/******** Directory=expdpdir dumpfile=temp. DMP reuse_dumpfiles=y schemas= (bfb2c,trans_user,bfcrm,bfstatuser) Logfile=2014-10-10.log
The rest of the work is very simple, make them a little bit of a replacement can be.
system/********------->BFB2C/DHHZDHHZ@ORCL. Here is an available user name and password
Directory=expdpdir: Where Expdpdir refers to a directory variable of the database, qlsql the statement to check, select * from All_directories; Replace it with an existing variable, and then put the DMP file under Directory_path.
Dumpfile=temp. DMP:TEMP.DMP is the data pump file you want to import.
Reuse_dumpfiles=y: This parameter is removed when imported.
Schemas= (bfb2c,trans_user,bfcrm,bfstatuser): The database instance to import, now I just import the first one, so
Schemas= (BFB2C) is OK.
If the export and import is not the same database, to use the REMAP_SCHEMA=A:B parameter, when you export data from a user, want to import to B users, use this: Remap_schema=a:b.
Logfile=2014-10-10.log: You name the following log file, used to record the imported log, easy to see errors.
There is also a parameter to explain, Table_exists_action=replace, if you want to replace the database instance of the original table structure, add this parameter is OK.
The final finished product is:
IMPDP BFB2C/DHHZDHHZ@ORCL Directory=expdpdir dumpfile=nmmz20101010. DMP table_exists_action=replace schemas= (BFB2C) Logfile=20141010.log
I tried, it's okay.