我的成长磨练,每天写博客,年轻人,卷起袖子,来把手弄脏吧! ------ 博客首页

oracle数据库备份和导入 bat 脚本

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

导入脚本

posted @ 2020-06-23 13:37  ltian123  阅读(671)  评论(0编辑  收藏  举报
go顶部