32 lines
1.0 KiB
Batchfile
32 lines
1.0 KiB
Batchfile
@echo off
|
|
|
|
:: =======================请修改这里三行的配置=======================
|
|
set savePath=E:\!!!重要数据备份
|
|
set dbUserList=WorkFlow_Support/WorkFlow_Instance
|
|
set dbConnStr=system/map@orcl
|
|
:: ==================================================================
|
|
|
|
if not exist %savePath% md %savePath%
|
|
set sDD=%date:~0,4%年%date:~5,2%月%date:~8,2%日
|
|
set sHH=%time:~0,2%
|
|
if /i %sHH% lss 10 (set sHH=0%time:~1,1%)
|
|
set sMM=%time:~3,2%
|
|
set sSS=%time:~6,2%
|
|
set savePath=%savePath%\%sDD%_%sHH%%sMM%%sSS%
|
|
echo ================================================================
|
|
echo 备份到目录%savePath%
|
|
echo ================================================================
|
|
if not exist %savePath% md %savePath%
|
|
:expcmd_start
|
|
for /f "tokens=1,* delims=/" %%a in ("%dbUserList%") do (
|
|
set c1=%%a
|
|
set c2=%%b
|
|
)
|
|
echo 正在导出用户%c1%...
|
|
echo ----------------------------------------------------------------
|
|
exp %dbConnStr% owner=(%c1%) rows=Y file= %savePath%\%c1%.dmp log=%savePath%\%c1%.log
|
|
if /i "%c2%" == "" goto expcmd_stop
|
|
set dbUserList=%c2%
|
|
goto expcmd_start
|
|
|
|
:expcmd_stop |