if "%time:~0,2%" lss "10" (set HH=0%time:~1,1%) else (set HH=%time:~0,2%) exp wqpm/wqpm@170.18.10.109:1521/orcl buffer=64000 file=F:\test\WQPM_%DATE:~0,4%%DATE:~5,2%%DATE:~8,2%%HH%%TIME:~3,2%%TIME:~6,2%_srv12.dmp log=F:\test\WQPM_%DATE:~0,4%%DATE:~5,2%%DATE:~8,2%%HH%%TIME:~3,2%%TIME:~6,2%_srv12_exp.log owner=wqpm compress=N forfiles /p F:\test /d -30 /s /m
备份脚本
170.18.10.109:1521 为内网oracle地址和端口
orcl 为oracle库
file=F:\test\WQPM_%DATE:~0,4%%DATE:~5,2%%DATE:~8,2%%HH%%TIME:~3,2%%TIME:~6,2%_srv12.dmp 为dmp导出文件 按时间设置文件名字,以及文件放置位置F盘。。。
等等
imp wqpm/wqpm@170.18.10.109:1521/orcl full=y file=F:\xxx.dmp
导入脚本