//create dir
CREATE DIRECTORY DMP_DIR as 'C:\TEMP\Dmp';
◆DIRECTORIES 状態確認
SELECT * FROM DBA_DIRECTORIES;
//impdp
impdp system/system schemas=USER_TEST1 directory=DMP_DIR dumpfile=TEST1_DMP.DMP remap_schema=USER_TEST1:USER_TEST2 logfile=USER_TEST2_impdp.log
impdp system/system@192.168.1.1/ORCLTEST schemas=SAMPLE directory=DATA_PUMP_DIR dumpfile=EXPDAT_ORCLTEST.DMP remap_schema=SAMPLE:USER_TEST1 logfile=ORCLTEST_impdp.log
impdp system/system schemas=SAMPLE directory=DMP_DIR dumpfile=EXPDAT_ORCLTEST.DMP remap_schema=SAMPLE:USER_TEST1 logfile=ORCLTEST_3_impdp.log TABLE_EXISTS_ACTION=TRUNCATE
// expdp
expdp system/system directory=DMP_DIR schemas=USER_TEST2 logfile=USER_TEST2_expdp.log
expdp SAMPLE/SAMPLE@192.168.1.1/ORCL directory=DATA_PUMP_DIR dumpfile=EXPDAT_ORCLTEST.DMP schemas=SAMPLE logfile=ORCLTESTDB_expdp.log
expdp SAMPLE/SAMPLE@192.168.1.1/ORCL directory=DATA_PUMP_DIR dumpfile=EXPDAT_ORCLTEST_20180719_ver121020.DMP schemas=SAMPLE version=12.1.0.2.0 logfile=ORCLTESTDB_20180719_ver121020_expdp.log
imp SAMPLE/SAMPLE@192.168.1.1/ORCL file=C:\temp\SMPDATA\sample.dmp fromuser=SAMPLE touser=SAMPLE ignore=y
exp SAMPLE/SAMPLE@192.168.1.1/ORCL file=C:\temp\SMPDATA\EXPDAT_SAMPLE_.DMP owner=SAMPLE log=C:\temp\SMPDATA\EXPDAT_SAMPLE_expdp.log
impdp system/system attach=SYS_IMPORT_SCHEMA_03
//确认导入导出的状态
select * from dba_datapump_jobs;