win batch file for exp daily
Date: Fri, 2 Mar 2018 13:29:59 -0500
Message-ID: <CAEhBma5103OAJDuiLcF=Yi2Po9phSFqkg=vr=4cgCGh0+Q5p8w_at_mail.gmail.com>
Hi List,
I'm new to the window's world, I need to set up a job to expdp database daily like cron job on linux.
First, I created the bat file as below, it didn't run, if I run the command, it runs. Can someone help me on this?
Thanks,
TY
rem Sample batch file to do daily export
_at_echo Export started at:
_at_echo
date /T
time /T
rem Here's a one-line NT command (but a LONG line!)
rem one that splits all the date parts out, putting
rem each one into it's own variable (weekday, day, month, year)
for /f ""tokens=1-4 delims=/ "" %%a in ('date /t') do (set weekday=%%a& set
day=%%b& set month=%%c& set year=%%d)
set logfile=%year%_%month%_%day%.log
set expfile=%year%_%month%_%d
set ORACLE_SID=oracle8
set ORACLE_HOME=E:\app\product\12.1.0\dbhome_1
E:\app\product\12.1.0\dbhome_1\bin\expdp.exe system/Senior12_at_oracle8 schemas=test directory=data_pump_dir dumpfile=testdump%T.dmp logfile=testlog.log job_name=test
_at_echo Export completed at:
_at_echo
date /T
time /T
-- http://www.freelists.org/webpage/oracle-lReceived on Fri Mar 02 2018 - 19:29:59 CET