The give batch script will create the automatic oracle database backup. Just create the batch file and sechdule it.
echo off
set baseDir=c:\backup\
set vDirName=%date:~0,2%%date:~3,2%%date:~6,4%
set vDumpFileName=%vDirName%-%time:~0,2%-%time:~3,2%-%time:~6,2%
set backupDir=%baseDir%%vDirName%
mkdir %backupDir%
echo direcotr create Date:%baseDir%%vDirName%
echo %vDumpFileName%
expdp scott/scott schemas=SCOTT directory=TEST_DIR dumpfile=%vDumpFileName%.DMP logfile=%vDumpFileName%.log
move c:\backup\%vDumpFileName%.log c:\backup\%vDirName%
move c:\backup\%vDumpFileName%.DMP c:\backup\%vDirName%
echo successfuly moved.
Wednesday, August 5, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment