expdp_task.cmd:
Correction to routines determining dates and times. Attempt to run the zip process at a low priority to reduce impact on the system. git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@5340 248e525c-4dfb-0310-94bc-949c084e9493
This commit is contained in:
@@ -1,3 +1,11 @@
|
|||||||
|
REM $Id:$
|
||||||
|
|
||||||
|
REM
|
||||||
|
REM Use Oracle data pump to export data, zip the dump file and then move it to the
|
||||||
|
REM backup directory.
|
||||||
|
REM
|
||||||
|
|
||||||
|
REM Enable extensions so that mkdir can create intermediate directories as required
|
||||||
VERIFY errors 2>nul
|
VERIFY errors 2>nul
|
||||||
SETLOCAL ENABLEEXTENSIONS
|
SETLOCAL ENABLEEXTENSIONS
|
||||||
IF ERRORLEVEL 1 echo Unable to enable extensions
|
IF ERRORLEVEL 1 echo Unable to enable extensions
|
||||||
@@ -5,22 +13,18 @@ IF ERRORLEVEL 1 echo Unable to enable extensions
|
|||||||
set dmpbasedir=C:\oracle\admin\webmip\dpdump
|
set dmpbasedir=C:\oracle\admin\webmip\dpdump
|
||||||
set dmpfile=%dmpbasedir%\webmip_data_expdp.dmp
|
set dmpfile=%dmpbasedir%\webmip_data_expdp.dmp
|
||||||
set logfile=%dmpbasedir%\webmip_data_expdp.log
|
set logfile=%dmpbasedir%\webmip_data_expdp.log
|
||||||
|
Set destbasedir=S:\orabackup\webmip\DataPump
|
||||||
|
FOR /F "TOKENS=1-3 DELIMS=/ " %%A IN ('DATE /T') DO (SET yyyy=%%C&set mm=%%B&set dd=%%A)
|
||||||
|
FOR /F "TOKENS=1 DELIMS=:" %%T IN ('TIME /T') DO SET hr=%%T
|
||||||
|
Set destdir=%destbasedir%\%yyyy%-%mm%
|
||||||
|
Set zipfile=webmip_expdp_%yyyy%-%mm%-%dd%-%hr%.zip
|
||||||
|
|
||||||
erase %dmpfile%
|
erase %dmpfile%
|
||||||
erase %logfile%
|
erase %logfile%
|
||||||
|
|
||||||
expdp 'sys/fmdidgad@webmip as sysdba' parfile=parfile_data.expdp
|
expdp 'sys/fmdidgad@webmip as sysdba' parfile=parfile_data.expdp
|
||||||
REM expdp 'sys/webmip@webmip as sysdba' parfile=parfile_nodata.expdp
|
|
||||||
|
|
||||||
Set destbasedir=S:\orabackup\webmip\DataPump
|
cmd /c /wait "start /low zip %zipfile% %dmpfile% %logfile%"
|
||||||
Set dd=%DATE:~0,2%
|
|
||||||
Set mm=%DATE:~3,2%
|
|
||||||
Set yyyy=%DATE:~6,4%
|
|
||||||
Set hr=%TIME:~0,2%
|
|
||||||
Set destdir=%destbasedir%\%yyyy%-%mm%
|
|
||||||
Set zipfile=webmip_expdp_%yyyy%-%mm%-%dd%-%hr%.zip
|
|
||||||
|
|
||||||
zip %zipfile% %dmpfile% %logfile%
|
|
||||||
|
|
||||||
mkdir %destdir%
|
mkdir %destdir%
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user