RE: win batch file for exp daily

From: Sweetser, Joe <JSweetser_at_icat.com>
Date: Fri, 2 Mar 2018 18:39:42 +0000
Message-ID: <CY4PR07MB290491A2D5AC5EDAA33A226DD4C50_at_CY4PR07MB2904.namprd07.prod.outlook.com>



This doesn’t answer your question (sorry), but have you considered installing/using cygwin (https://www.cygwin.com/). Very helpful for those transitioning to Windows from Linux/Unix. Free. Functional. I use it for an X server. I think it “does cron”, too.

-joe

From: oracle-l-bounce_at_freelists.org <oracle-l-bounce_at_freelists.org> On Behalf Of Joan Hsieh Sent: Friday, March 2, 2018 11:30 AM
To: oracle-l_at_freelists.org
Subject: win batch file for exp daily

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

This e-mail transmission and any attachments that accompany it may contain information that is privileged, confidential or otherwise exempt from disclosure under applicable law and is intended solely for the use of the individual's to whom it was intended to be addressed. If you have received this e-mail by mistake, or you are not the intended recipient, any disclosure, dissemination, distribution, copying or other use or retention of this communication or its substance is prohibited. If you have received this communication in error, please immediately reply to the author via e-mail that you received this message by mistake and also permanently delete the original and all copies of this e-mail and any attachments from your computer. Please note that coverage cannot be bound or altered by sending an email. You must receive written confirmation from a representative of our firm to put coverage in force or make changes to an existing policy.

--
http://www.freelists.org/webpage/oracle-l
Received on Fri Mar 02 2018 - 19:39:42 CET

Original text of this message