Re: win batch file for exp daily

  • From: Joan Hsieh <joanhsieh08@xxxxxxxxx>
  • To: "Sweetser, Joe" <JSweetser@xxxxxxxx>
  • Date: Fri, 2 Mar 2018 13:46:20 -0500

Thanks Joe,

This job is set for our client, they are all running on windows. To my
understanding, they want to set up in task schedulers. I need to  make the
bat file run properly and to set it in task scheduler later?

TY

On Fri, Mar 2, 2018 at 1:39 PM, Sweetser, Joe <JSweetser@xxxxxxxx> wrote:

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@xxxxxxxxxxxxx <oracle-l-bounce@xxxxxxxxxxxxx> *On
Behalf Of *Joan Hsieh
*Sent:* Friday, March 2, 2018 11:30 AM
*To:* oracle-l@xxxxxxxxxxxxx
*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

@echo Export started 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@oracle8
schemas=test directory=data_pump_dir dumpfile=testdump%T.dmp
logfile=testlog.log job_name=test



@echo Export completed 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.

Other related posts: