rem 设定开始时间
set "ks=%date:~,4%/%date:~5,2%/%date:~8,2% %time:~0,2%:%time:~3,2%:%time:~6,2%"
rem 开始导出数据
exp 远程账户/远程用户密码@远程地址:2521/orcl file=D:\Oracle\EXPmcpdm202106231.dmp TABLES=(用户名.表名)
rem 设定结束时间
set "js=%date:~,4%/%date:~5,2%/%date:~8,2% %time:~0,2%:%time:~3,2%:%time:~6,2%"
rem 把导出的开始和结束时间输出到日志文件中
echo Begin Time: >>D:\scott_log.txt
echo %ks%>>D:\scott_log.txt
echo End Time: >>D:\scott_log.txt
echo %js%>>D:\scott_log.txt
pause