备份oracle数据库CMD脚本
@echo off
rem oracle dump文件默认备份地址
set dumppath=D:apporacleadminorcldpdump
rem 获取备份日期
set now=%date:~0,4%%date:~5,2%%date:~8,2%
set username=oracle
set password=oracle
set host=127.0.0.1
set dbname=oracle
set backupfile=%now%.dmp
set backuplog=%now%.log
set backfilepath=E:db
rem 导出dump文件
expdp %username%/%password%@%host%/orcl directory=DATA_PUMP_DIR dumpfile=%backupfile% logfile=%backuplog% schemas=unimax_jsdj_cs version=11.2.0.1.0
rem 复制dump文件和日志文件
copy %dumppath%%now%.log %backfilepath%
copy %dumppath%%now%.dmp %backfilepath%
del %dumppath%%now%.log /F /Q
del %dumppath%%now%.dmp /F /Q
pause