@echo off echo echo echo color 0b & cls echo 设置备份文件存放文件夹... set "tbuf=D:\back"
echo db set name=%date% set name=%name:~-3% set name=db_%name%
echo 是否存在同名文件,若存在则删除同名文件... if exist %tbuf%\%name%.dmp del %tbuf%\%name%.dmp if exist %tbuf%\%name%.log del %tbuf%\%name%.log echo 开始备份(备份整个数据库).....
exp 用户名/密码@orcl full=y file=%tbuf%\%name%.dmp log=%tbuf%\%name%.log
echo 备份完毕!