+
执行步骤:
ant -f 1_exp_prod.xml
copy file from prod to uat (maunule)
ant -f 3_imp_uat.xml
附件:
1.1_exp_prod.xml
<?xml version="1.0" encoding="UTF-8"?>
<project name="DBHandler" basedir="." default="exp">
<target name="exp">
<exec executable="cmd.exe">
<arg line="/c expdp system/oracle123@t1prod file=t1prod2016128_%U.dmp directory=XMLDIR log=t1prod20161122_152621.log tables=('t1data.event','t1data.eventRp','t1data.tblSign','t1data.tblLeave','t1data.daytime','t1data.day') parallel=4"/>
</exec>
</target>
</project>
2. copy_to_uat.xml
<?xml version="1.0" encoding="UTF-8"?> -<project default="copy" basedir="." name="DBHandler"> -<target name="copy"> -<exec executable="cmd.exe"> <arg line="/c copy D:appAdministratorproduct11.2.0dbhome_1 dbmsxml 1prod20161122_152621_2.dmp to 192.168.63.19:C:appAdministratorproduct11.2.0dbhome_1 dbmsxml/> </exec> </target> </project>
3.3_imp_uat.xml
<?xml version="1.0" encoding="UTF-8"?>
<project name="DBHandler" basedir="." default="imp">
<target name="imp">
<exec executable="cmd.exe">
<arg line="/c impdp system/oracle123@t1uat file=t1prod2016128_%U.dmp directory=XMLDIR log=TS_all_imp_2016_09_02.log table_exists_action=replace remap_schema=t1data:t1data parallel=4"/>
</exec>
</target>
</project>