坐了十五小时的车,终于到达格尔木观测站,到达前,一下子还迷路了,找不到观测站在哪了,只记得在江源路,费了好大劲发现原来自己已经在跟前了。将大家都安排完,已经近凌晨4点,想着老外,特别还有老头老太太,可能都累的不成了,跟他们讲,在睡觉前也许可以吃点东西,如果愿意睡懒觉,大家可以睡到中午前,吃完中午饭后,可以一起去看看“万丈盐桥”。发现自己好像已经清醒不想再睡了,上了一会网。
格站比几年前我在站上的时候好不了不知多少倍,干净明亮,还充满学术气氛。住的房间象宾馆一样,更多的是放心,绝对是干净的。
将以下内容保存为 OracleExportAutomata.bat,运行即可。可以与Windows计划任务联合使用,比如每天3:00am运行一次。
@echo off
echo ———–
echo name: Oracle data export automata utility
echo author: WANG Liangxu
echo date: 2006-8-7
echo refined by NAN Zhuotong
echo documented by NAN Zhuotong
echo Any problem please contact us via [email protected]; [email protected]
REM This program is used to export data in Oracle to external files named with current date.
REM A simple export schema is employed. Monday the data will be completely exported.
REM Tuesday through Thursday data will be exported in an incremental manner.
REM Friday, data exported include all the incremental data since the last completed export.
REM Saturday and Sunday incremental export will be employed once more.
REM This program can be used together with Windows plan and task utility. In that way,
REM the program can be enhanced with running by schedule.
echo ———–
set w=%date:~13,1%
set d=%date:~0,4%%date:~5,2%%date:~8,2%
rem echo %d%
if %w%==一 goto 1
if %w%==二 goto 2
if %w%==三 goto 3
if %w%==四 goto 4
if %w%==五 goto 5
if %w%==六 goto 6
if %w%==日 goto 7
REM exp system/systemwestdc inctype=complete file=d:/ORADB-BACKUP/20060807.dmp (complete)
REM exp system/systemwestdc inctype=incremental file=d:/ORADB-BACKUP/2006xxxx.dmp
REM exp system/systemwestdc inctype=cumulative file=d:/ORADB-BACKUP/2006xxxx.dmp
REM Mon: 完全备份(A)
REM Tue: 增量导出(B)
REM Wed: 增量导出(C)
REM Thu: 增量导出(D)
REM Fri: 累计导出(E)
REM Sat: 增量导出(F)
REM Sun: 增量导出(G)
:1
echo Begin exporting data to file %d%-compl.dmp
exp system/systemwestdc inctype=complete file=d:/ORADB-BACKUP/%d%-compl.dmp
goto end
:2
echo Begin exporting data to file %d%-incre.dmp
exp system/systemwestdc inctype=incremental file=d:/ORADB-BACKUP/%d%-incre.dmp
goto end
:3
echo Begin exporting data to file %d%-incre.dmp
exp system/systemwestdc inctype=incremental file=d:/ORADB-BACKUP/%d%-incre.dmp
goto end
:4
echo Begin exporting data to file %d%-incre.dmp
exp system/systemwestdc inctype=incremental file=d:/ORADB-BACKUP/%d%-incre.dmp
goto end
:5
echo Begin exporting data to file %d%-cumul.dmp
exp system/systemwestdc inctype=cumulative file=d:/ORADB-BACKUP/%d%-cumul.dmp
goto end
:6
echo Begin exporting data to file %d%-incre.dmp
exp system/systemwestdc inctype=incremental file=d:/ORADB-BACKUP/%d%-incre.dmp
goto end
:7
echo Begin exporting data to file %d%-incre.dmp
exp system/systemwestdc inctype=incremental file=d:/ORADB-BACKUP/%d%-incre.dmp
goto end
:end