Auto EXP Backup using batch file

@echo off
REM
SET dirname="%date:~3,2%-%date:~0,2%-%date:~6,4%"
mkdir \\192.168.0.4\Oracle_backup\%dirname%                      [It will create a folder using sysdate]

--set Stamp=%DATE:~-4%%DATE:~-10,2%%DATE:~-7,2%
set oracle_sid=ala
setlocal
for /f "tokens=1-4 delims=/ " %%a in ('date /t') do set DATE=%%c-%%b-%%a
for /f "tokens=1-3 delims=: " %%a in ('time /t') do (
set hours=%%a
set minutes=%%b
set ampm=%%c
)
if {%ampm%}=={AM} if {%hours%}=={12} set hours=00
if {%ampm%}=={PM} (
for /f "delims=0 tokens=*" %%a in ("%hours%") do set hours=%%a
set /a hours+= 12
)
D:\oracle\product\10.2.0\db_1\BIN\exp hr/hr@orcl file=\\192.168.0.4\Oracle_backup\\%dirname%\hr_%date%_%hours%.%minutes%_%ampm%.dmp  log=\\192.168.0.4\Oracle_backup\\%dirname%\hr_%date%_%hours%.%minutes%_%ampm%.log




কোন মন্তব্য নেই:

একটি মন্তব্য পোস্ট করুন